Skip to content

Commit 8e72083

Browse files
authored
Merge pull request #1027 from janrybka/v0-mssqlclient
v0: Update from System.Data.SqlClient to Microsoft.Data.SqlClient in v0.x
2 parents 51ad107 + 29a3c4f commit 8e72083

File tree

18 files changed

+58
-12
lines changed

18 files changed

+58
-12
lines changed

Source/EventFlow.MongoDB.Tests/EventFlow.MongoDB.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
55
<IsPackable>False</IsPackable>
6+
<NoWarn>NU1903</NoWarn> <!-- MongoDB.Driver is outdated and update requires .NetFramework update -->
67
</PropertyGroup>
78

89
<ItemGroup>
@@ -19,3 +20,4 @@
1920
</ItemGroup>
2021

2122
</Project>
23+

Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<PackageTags>CQRS ES event sourcing MongoDB</PackageTags>
2323
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
2424
<IsPackable>true</IsPackable>
25+
<NoWarn>NU1903</NoWarn> <!-- MongoDB.Driver is outdated and update requires .NetFramework update -->
2526
</PropertyGroup>
2627

2728
<ItemGroup>

Source/EventFlow.MsSql/Connections/MsSqlConnectionFactory.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222

2323
using System.Data;
24+
#if NETSTANDARD2_0_OR_GREATER
25+
using Microsoft.Data.SqlClient;
26+
#else
2427
using System.Data.SqlClient;
28+
#endif
2529
using System.Threading;
2630
using System.Threading.Tasks;
2731

Source/EventFlow.MsSql/EventFlow.MsSql.csproj

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,15 @@
2121
<IsPackable>true</IsPackable>
2222
</PropertyGroup>
2323

24-
<ItemGroup>
24+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
25+
<PackageReference Include="dbup-sqlserver" Version="5.0.40" />
26+
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
27+
</ItemGroup>
28+
<ItemGroup Condition="'$(TargetFramework)' != 'netstandard2.0'">
2529
<PackageReference Include="dbup-sqlserver" Version="4.1.0" />
30+
</ItemGroup>
31+
32+
<ItemGroup>
2633
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
2734
</ItemGroup>
2835

Source/EventFlow.MsSql/EventStores/MsSqlEventPersistence.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222

2323
using System;
2424
using System.Collections.Generic;
25+
#if NETSTANDARD2_0_OR_GREATER
26+
using Microsoft.Data.SqlClient;
27+
#else
2528
using System.Data.SqlClient;
29+
#endif
2630
using System.Linq;
2731
using System.Threading;
2832
using System.Threading.Tasks;

Source/EventFlow.MsSql/Integrations/TableParameter.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,20 @@
2323
using System;
2424
using System.Collections.Generic;
2525
using System.Data;
26+
#if NETSTANDARD2_0_OR_GREATER
27+
using Microsoft.Data.SqlClient;
28+
#else
2629
using System.Data.SqlClient;
30+
#endif
2731
using System.IO;
2832
using System.Linq;
2933
using System.Reflection;
3034
using Dapper;
35+
#if NETSTANDARD2_0_OR_GREATER
36+
using Microsoft.Data.SqlClient.Server;
37+
#else
3138
using Microsoft.SqlServer.Server;
39+
#endif
3240

3341
namespace EventFlow.MsSql.Integrations
3442
{

Source/EventFlow.MsSql/RetryStrategies/MsSqlErrorRetryStrategy.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
using System;
2424
using System.Collections.Generic;
2525
using System.ComponentModel;
26+
#if NETSTANDARD2_0_OR_GREATER
27+
using Microsoft.Data.SqlClient;
28+
#else
2629
using System.Data.SqlClient;
30+
#endif
2731
using System.Linq;
2832
using EventFlow.Core;
2933
using EventFlow.Logs;

Source/EventFlow.MsSql/SnapshotStores/MsSqlSnapshotPersistence.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222

2323
using System;
24+
#if NETSTANDARD2_0_OR_GREATER
25+
using Microsoft.Data.SqlClient;
26+
#else
2427
using System.Data.SqlClient;
28+
#endif
2529
using System.Linq;
2630
using System.Threading;
2731
using System.Threading.Tasks;

Source/EventFlow.Owin.Tests/EventFlow.Owin.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
66
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
77
<IsPackable>False</IsPackable>
8+
<NoWarn>NU1903</NoWarn> <!--Microsoft.Owin is outdated and update requires Autofac and a lot more to update -->
89
</PropertyGroup>
910
<ItemGroup>
1011
<Folder Include="Properties\" />

Source/EventFlow.Owin/EventFlow.Owin.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<NeutralLanguage>en-US</NeutralLanguage>
2020
<PackageReleaseNotes>UPDATED BY BUILD</PackageReleaseNotes>
2121
<IsPackable>true</IsPackable>
22+
<NoWarn>NU1903</NoWarn> <!--Microsoft.Owin is outdated and update requires Autofac and a lot more to update -->
2223
</PropertyGroup>
2324

2425
<ItemGroup>

0 commit comments

Comments
 (0)