Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced System.Data.SqlClient with Microsoft.Data.SqlClient #43

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<Reference Include="System.Transactions" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ namespace NEventStore.Persistence.AcceptanceTests
using NEventStore.Persistence.Sql;
using NEventStore.Persistence.Sql.SqlDialects;
using NEventStore.Serialization;
#if NET462
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
using System.Transactions;

public partial class PersistenceEngineFixture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using FluentAssertions;
#if NET462
using NEventStore.Diagnostics;
using System.Data.SqlClient;
#endif
using NEventStore.Persistence.AcceptanceTests.BDD;
using NEventStore.Persistence.Sql;
Expand All @@ -18,7 +19,6 @@
#endif
#if NUNIT
using NUnit.Framework;
using System.Data.SqlClient;
#endif
#if XUNIT
using Xunit;
Expand Down Expand Up @@ -126,7 +126,7 @@ public IsolationLevelPersistenceEngineFixture()
#if NET462
_connectionFactory = new EnviromentConnectionFactory("MsSql", "System.Data.SqlClient");
#else
_connectionFactory = new EnviromentConnectionFactory("MsSql", System.Data.SqlClient.SqlClientFactory.Instance);
_connectionFactory = new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance);
#endif
_createPersistence = () =>
new SqlPersistenceFactory(_connectionFactory,
Expand Down
9 changes: 7 additions & 2 deletions src/NEventStore.Persistence.MsSql.Tests/WireupTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ namespace NEventStore.Persistence.AcceptanceTests
#if MSTEST
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
#if NET462
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif
#if NUNIT
using NUnit.Framework;
using System.Data.SqlClient;

#endif
#if XUNIT
using Xunit;
Expand All @@ -34,7 +39,7 @@ protected override void Context()
#if NET462
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", "System.Data.SqlClient"))
#else
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", System.Data.SqlClient.SqlClientFactory.Instance))
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance))
#endif
.WithDialect(new MsSqlDialect())
.WithStreamIdHasher(streamId =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
<Reference Include="System.Configuration" />
<Reference Include="System.Transactions" />
<Reference Include="System.Web" />
Expand Down
4 changes: 4 additions & 0 deletions src/NEventStore.Persistence.Sql/SqlDialects/MsSqlDialect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
namespace NEventStore.Persistence.Sql.SqlDialects
{
using System;
#if NET462
using System.Data.SqlClient;
#else
using Microsoft.Data.SqlClient;
#endif

public class MsSqlDialect : CommonSqlDialect
{
Expand Down