Skip to content

Commit fcc9aa0

Browse files
Esben BachAGiorgetti
authored andcommitted
Replaced System.Data.SqlClient with Microsoft.Data.SqlClient for non-net462 targets.
1 parent 1fe22cb commit fcc9aa0

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

src/NEventStore.Persistence.MsSql.Tests/NEventStore.Persistence.MsSql.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
17+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
1818
</ItemGroup>
1919
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
2020
<Reference Include="System.Transactions" />

src/NEventStore.Persistence.MsSql.Tests/PersistenceEngineFixture.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ namespace NEventStore.Persistence.AcceptanceTests
55
using NEventStore.Persistence.Sql;
66
using NEventStore.Persistence.Sql.SqlDialects;
77
using NEventStore.Serialization;
8+
#if NET462
89
using System.Data.SqlClient;
10+
#else
11+
using Microsoft.Data.SqlClient;
12+
#endif
913
using System.Transactions;
1014

1115
public partial class PersistenceEngineFixture

src/NEventStore.Persistence.MsSql.Tests/TransactionIsolationLevelTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using FluentAssertions;
77
#if NET462
88
using NEventStore.Diagnostics;
9+
using System.Data.SqlClient;
910
#endif
1011
using NEventStore.Persistence.AcceptanceTests.BDD;
1112
using NEventStore.Persistence.Sql;
@@ -18,7 +19,6 @@
1819
#endif
1920
#if NUNIT
2021
using NUnit.Framework;
21-
using System.Data.SqlClient;
2222
#endif
2323
#if XUNIT
2424
using Xunit;
@@ -126,7 +126,7 @@ public IsolationLevelPersistenceEngineFixture()
126126
#if NET462
127127
_connectionFactory = new EnviromentConnectionFactory("MsSql", "System.Data.SqlClient");
128128
#else
129-
_connectionFactory = new EnviromentConnectionFactory("MsSql", System.Data.SqlClient.SqlClientFactory.Instance);
129+
_connectionFactory = new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance);
130130
#endif
131131
_createPersistence = () =>
132132
new SqlPersistenceFactory(_connectionFactory,

src/NEventStore.Persistence.MsSql.Tests/WireupTests.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,14 @@ namespace NEventStore.Persistence.AcceptanceTests
1010
#if MSTEST
1111
using Microsoft.VisualStudio.TestTools.UnitTesting;
1212
#endif
13+
#if NET462
14+
using System.Data.SqlClient;
15+
#else
16+
using Microsoft.Data.SqlClient;
17+
#endif
1318
#if NUNIT
1419
using NUnit.Framework;
15-
using System.Data.SqlClient;
20+
1621
#endif
1722
#if XUNIT
1823
using Xunit;
@@ -34,7 +39,7 @@ protected override void Context()
3439
#if NET462
3540
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", "System.Data.SqlClient"))
3641
#else
37-
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", System.Data.SqlClient.SqlClientFactory.Instance))
42+
.UsingSqlPersistence(new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance))
3843
#endif
3944
.WithDialect(new MsSqlDialect())
4045
.WithStreamIdHasher(streamId =>

src/NEventStore.Persistence.Sql/NEventStore.Persistence.Sql.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<ItemGroup>
3030
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
31-
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
31+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
3232
</ItemGroup>
3333
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
3434
<Reference Include="System.Configuration" />

src/NEventStore.Persistence.Sql/SqlDialects/MsSqlDialect.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
namespace NEventStore.Persistence.Sql.SqlDialects
66
{
77
using System;
8+
#if NET462
89
using System.Data.SqlClient;
10+
#else
11+
using Microsoft.Data.SqlClient;
12+
#endif
913

1014
public class MsSqlDialect : CommonSqlDialect
1115
{

0 commit comments

Comments
 (0)