Skip to content

Commit

Permalink
Merge pull request #1024 from janrybka/v1-mssqlclient
Browse files Browse the repository at this point in the history
Update from System.Data.SqlClient to Microsoft.Data.SqlClient in v1.x
  • Loading branch information
rasmus authored Apr 2, 2024
2 parents 15d31c2 + 0c6d484 commit 2b100fb
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Threading;
using System.Threading.Tasks;

Expand Down
3 changes: 2 additions & 1 deletion Source/EventFlow.MsSql/EventFlow.MsSql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="dbup-sqlserver" Version="4.1.0" />
<PackageReference Include="dbup-sqlserver" Version="5.0.40" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Expand Down
4 changes: 2 additions & 2 deletions Source/EventFlow.MsSql/Integrations/TableParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Reflection;
using Dapper;
using Microsoft.SqlServer.Server;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;

namespace EventFlow.MsSql.Integrations
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;
using EventFlow.Core;
using Microsoft.Extensions.Logging;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Expand Down
4 changes: 2 additions & 2 deletions Source/EventFlow.Sql/EventFlow.Sql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Include="dbup-core" Version="4.1.0" />
<PackageReference Include="Dapper" Version="2.1.35" />
<PackageReference Include="dbup-core" Version="5.0.37" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.TestHelpers/EventFlow.TestHelpers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.TestHelpers/MsSql/IMsSqlDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;

namespace EventFlow.TestHelpers.MsSql
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Text.RegularExpressions;
using EventFlow.ValueObjects;

Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.TestHelpers/MsSql/MsSqlDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;

namespace EventFlow.TestHelpers.MsSql
{
Expand Down
10 changes: 6 additions & 4 deletions Source/EventFlow.TestHelpers/MsSql/MsSqlHelpz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using System.Linq;

namespace EventFlow.TestHelpers.MsSql
Expand Down Expand Up @@ -49,7 +49,8 @@ public static MsSqlConnectionString CreateConnectionString(string label)
{
DataSource = FirstNonEmpty(
Environment.GetEnvironmentVariable("EVENTFLOW_MSSQL_SERVER"),
".")
"."),
Encrypt = false
};

var password = Environment.GetEnvironmentVariable("EVENTFLOW_MSSQL_PASS");
Expand Down Expand Up @@ -82,9 +83,10 @@ public static MsSqlConnectionString CreateConnectionString(string label)

connectionStringBuilder.InitialCatalog = databaseName;

Console.WriteLine($"Using connection string for tests: {connectionStringBuilder.ConnectionString}");
var connectionString = connectionStringBuilder.ConnectionString;
Console.WriteLine($"Using connection string for tests: {connectionString}");

return new MsSqlConnectionString(connectionStringBuilder.ConnectionString);
return new MsSqlConnectionString(connectionString);
}

private static bool IsGoodConnectionString(string connectionString)
Expand Down

0 comments on commit 2b100fb

Please sign in to comment.