Skip to content

Commit e0269f6

Browse files
committed
Merge branch 'release/9.2.0'
2 parents e48a088 + 56748b7 commit e0269f6

12 files changed

+487
-474
lines changed

Changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# NEventStore.Persistence.Sql
22

3+
## 9.2.0
4+
5+
- Using Microsoft.Data.SqlClient instead of System.Data.SqlClient [#40](https://github.com/NEventStore/NEventStore.Persistence.SQL/issues/40)
6+
7+
### Breaking Change
8+
9+
- System.Data.SqlClient is not supported anymore.
10+
- To properly update to Microsoft.Data.SqlClient follow the guirelines in [SqlClient porting cheat sheet](https://github.com/dotnet/SqlClient/blob/main/porting-cheat-sheet.md).
11+
312
## 9.1.2
413

514
- fixed .nuspec file (wrong net462 references)

LICENSE renamed to LICENSE.txt

File renamed without changes.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To build the project locally on a Windows Machine:
6060
- Define the following environment variables:
6161

6262
```
63-
NEventStore.MsSql="Server=localhost,50001;Database=NEventStore;User Id=sa;Password=Password1;"
63+
NEventStore.MsSql="Server=localhost,50001;Database=NEventStore;User Id=sa;Password=Password1;TrustServerCertificate=True;"
6464
NEventStore.MySql="Server=localhost;Port=50003;Database=NEventStore;Uid=sa;Pwd=Password1;AutoEnlist=false;"
6565
NEventStore.PostgreSql="Server=localhost;Port=50004;Database=NEventStore;Uid=sa;Pwd=Password1;Enlist=false;"
6666
NEventStore.Oracle="Data Source=localhost:1521/XE;User Id=system;Password=Password1;Persist Security Info=True;"

docker/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DockerComposeDown.ps1
1111

1212
## Docker Environment Variables
1313

14-
NEventStore.MsSql="Server=localhost,50001;Database=NEventStore;User Id=sa;Password=Password1;"
14+
NEventStore.MsSql="Server=localhost,50001;Database=NEventStore;User Id=sa;Password=Password1;TrustServerCertificate=True;"
1515
NEventStore.MongoDB="mongodb://localhost:50002/NEventStore"
1616
NEventStore.MySql="Server=localhost;Port=50003;Database=NEventStore;Uid=sa;Pwd=Password1;AutoEnlist=false;"
1717
NEventStore.PostgreSql="Server=localhost;Port=50004;Database=NEventStore;Uid=sa;Pwd=Password1;Enlist=false;"

src/.editorconfig

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,28 @@
1-
[*]
1+
[*]
2+
23
end_of_line = crlf
3-
indent_style = space
4-
indent_size = 4
4+
indent_style = tab
5+
trim_trailing_whitespace = true
56

67
[*.xml]
7-
indent_style = space
8+
9+
indent_style = tab
10+
11+
[*.cs]
12+
13+
csharp_new_line_before_open_brace = all
14+
15+
# RCS1229: Use async/await when necessary.
16+
dotnet_diagnostic.RCS1229.severity = error
17+
18+
# IDE0063: Use simple 'using' statement
19+
csharp_prefer_simple_using_statement = false
20+
21+
# IDE0090: Use 'new(...)'
22+
csharp_style_implicit_object_creation_when_type_is_apparent = false
23+
24+
# IDE0290: Use primary constructor
25+
csharp_style_prefer_primary_constructors = false
26+
27+
# IDE0028: Simplify collection initialization
28+
dotnet_style_collection_initializer = false

src/.nuget/NEventStore.Persistence.Sql.nuspec

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
<summary>Sql persistence provider for NEventStore.</summary>
1313
<language>es-US</language>
1414
<tags>events, event sourcing, cqrs, storage, persistence, database, sql</tags>
15-
<!--
15+
<readme>docs\README.md</readme>
16+
<license type="file">LICENSE.txt</license>
17+
<!--
1618
Until this is on develop branch, this version should be the previous version, so it made it compatible
1719
with pre-release of the actual version. Ex, if we are on 6.0.0 unstable, dependency from NEventStore should
1820
be latest stable version so it can take prerelease of 6.0.0 version.
@@ -23,12 +25,12 @@
2325
<group targetFramework=".NETFramework4.6.2">
2426
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
2527
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
26-
<dependency id="System.Data.SqlClient" version="4.8.5" exclude="Build,Analyzers" />
28+
<dependency id="Microsoft.Data.SqlClient" version="5.2.0" exclude="Build,Analyzers" />
2729
</group>
2830
<group targetFramework=".NETStandard2.0">
2931
<dependency id="NEventStore" version="[9.1.1,10.0.0)" exclude="Build,Analyzers"/>
3032
<dependency id="Microsoft.Extensions.Logging.Abstractions" version="7.0.1" exclude="Build,Analyzers" />
31-
<dependency id="System.Data.SqlClient" version="4.8.5" exclude="Build,Analyzers" />
33+
<dependency id="Microsoft.Data.SqlClient" version="5.2.0" exclude="Build,Analyzers" />
3234
</group>
3335
</dependencies>
3436
<frameworkAssemblies>
@@ -41,5 +43,7 @@
4143
<!--<file src="bin\$configuration$\**" target="lib"/>-->
4244
<file src="..\NEventStore.Persistence.Sql\bin\$configuration$\**\NEventStore.Persistence.Sql.dll" target="lib"/>
4345
<file src="..\NEventStore.Persistence.Sql\bin\$configuration$\**\NEventStore.Persistence.Sql.xml" target="lib"/>
46+
<file src="..\..\README.md" target="docs\" />
47+
<file src="..\..\LICENSE.txt" target="" />
4448
</files>
4549
</package>

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: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,28 @@
22

33
namespace NEventStore.Persistence.AcceptanceTests
44
{
5-
using NEventStore.Persistence.Sql;
6-
using NEventStore.Persistence.Sql.SqlDialects;
7-
using NEventStore.Serialization;
8-
using System.Data.SqlClient;
9-
using System.Transactions;
5+
using NEventStore.Persistence.Sql;
6+
using NEventStore.Persistence.Sql.SqlDialects;
7+
using NEventStore.Serialization;
8+
using System.Transactions;
109

11-
public partial class PersistenceEngineFixture
12-
{
13-
/// <summary>
14-
/// this mimic the current NEventStore default values which is run outside any transaction (creates a scope that
15-
/// suppresses any transaction)
16-
/// </summary>
17-
public TransactionScopeOption? ScopeOption { get; set; } = null; // the old default: TransactionScopeOption.Suppress;
10+
public partial class PersistenceEngineFixture
11+
{
12+
/// <summary>
13+
/// this mimic the current NEventStore default values which is run outside any transaction (creates a scope that
14+
/// suppresses any transaction)
15+
/// </summary>
16+
public TransactionScopeOption? ScopeOption { get; set; } = null; // the old default: TransactionScopeOption.Suppress;
1817

19-
public PersistenceEngineFixture()
20-
{
21-
#if NET462
22-
_createPersistence = pageSize =>
23-
new SqlPersistenceFactory(new EnviromentConnectionFactory("MsSql", "System.Data.SqlClient"),
24-
new BinarySerializer(),
25-
new MsSqlDialect(),
26-
pageSize: pageSize,
27-
scopeOption: ScopeOption
28-
).Build();
29-
#else
30-
_createPersistence = pageSize =>
31-
new SqlPersistenceFactory(new EnviromentConnectionFactory("MsSql", SqlClientFactory.Instance),
32-
new BinarySerializer(),
33-
new MsSqlDialect(),
34-
pageSize: pageSize,
35-
scopeOption: ScopeOption
36-
).Build();
37-
#endif
38-
}
39-
}
18+
public PersistenceEngineFixture()
19+
{
20+
_createPersistence = pageSize =>
21+
new SqlPersistenceFactory(new EnviromentConnectionFactory("MsSql", Microsoft.Data.SqlClient.SqlClientFactory.Instance),
22+
new BinarySerializer(),
23+
new MsSqlDialect(),
24+
pageSize: pageSize,
25+
scopeOption: ScopeOption
26+
).Build();
27+
}
28+
}
4029
}

0 commit comments

Comments
 (0)