From 8c63305f63d492a6ec9f58365676e5f84f51f0a9 Mon Sep 17 00:00:00 2001 From: Tatsuro Shibamura Date: Sat, 28 Jan 2023 17:08:52 +0900 Subject: [PATCH] Changed to use Microsoft SqlClient Data Provider (#61) * Changed to use Microsoft SqlClient Data Provider * Update to latest `Microsoft.Data.SqlClient` version --------- Co-authored-by: Steve Molloy --- ...nState.SqlSessionStateProviderAsync.csproj | 5 ++ .../SqlCommandExtension.cs | 2 +- .../SqlCommandHelper.cs | 2 +- .../SqlInMemoryTableSessionStateRepository.cs | 2 +- .../SqlParameterCollectionExtension.cs | 2 +- .../SqlSessionStateRepository.cs | 2 +- .../SqlSessionStateRepositoryUtil.cs | 4 +- ...e.SqlSessionStateProviderAsync.Test.csproj | 68 +++++++------------ .../SqlCommandHelperTest.cs | 2 +- .../app.config | 11 --- .../packages.config | 17 ----- 11 files changed, 38 insertions(+), 79 deletions(-) delete mode 100644 test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/app.config delete mode 100644 test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/packages.config diff --git a/src/SqlSessionStateProviderAsync/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.csproj b/src/SqlSessionStateProviderAsync/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.csproj index dd92915..aaffb00 100644 --- a/src/SqlSessionStateProviderAsync/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.csproj +++ b/src/SqlSessionStateProviderAsync/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.csproj @@ -92,6 +92,11 @@ Microsoft.AspNet.SessionState.SessionStateModule + + + 5.1.0 + + diff --git a/src/SqlSessionStateProviderAsync/SqlCommandExtension.cs b/src/SqlSessionStateProviderAsync/SqlCommandExtension.cs index a7ab19b..c8ea32e 100644 --- a/src/SqlSessionStateProviderAsync/SqlCommandExtension.cs +++ b/src/SqlSessionStateProviderAsync/SqlCommandExtension.cs @@ -3,8 +3,8 @@ namespace Microsoft.AspNet.SessionState { - using System.Data.SqlClient; using System.Diagnostics; + using Microsoft.Data.SqlClient; static class SqlCommandExtension { diff --git a/src/SqlSessionStateProviderAsync/SqlCommandHelper.cs b/src/SqlSessionStateProviderAsync/SqlCommandHelper.cs index 88fc605..4db83a3 100644 --- a/src/SqlSessionStateProviderAsync/SqlCommandHelper.cs +++ b/src/SqlSessionStateProviderAsync/SqlCommandHelper.cs @@ -3,8 +3,8 @@ namespace Microsoft.AspNet.SessionState { + using Microsoft.Data.SqlClient; using System.Data; - using System.Data.SqlClient; class SqlCommandHelper { diff --git a/src/SqlSessionStateProviderAsync/SqlInMemoryTableSessionStateRepository.cs b/src/SqlSessionStateProviderAsync/SqlInMemoryTableSessionStateRepository.cs index ec655f3..b3ac296 100644 --- a/src/SqlSessionStateProviderAsync/SqlInMemoryTableSessionStateRepository.cs +++ b/src/SqlSessionStateProviderAsync/SqlInMemoryTableSessionStateRepository.cs @@ -4,8 +4,8 @@ namespace Microsoft.AspNet.SessionState { using Resources; + using Microsoft.Data.SqlClient; using System; - using System.Data.SqlClient; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; diff --git a/src/SqlSessionStateProviderAsync/SqlParameterCollectionExtension.cs b/src/SqlSessionStateProviderAsync/SqlParameterCollectionExtension.cs index 47ee355..73ad96d 100644 --- a/src/SqlSessionStateProviderAsync/SqlParameterCollectionExtension.cs +++ b/src/SqlSessionStateProviderAsync/SqlParameterCollectionExtension.cs @@ -3,9 +3,9 @@ namespace Microsoft.AspNet.SessionState { + using Microsoft.Data.SqlClient; using System; using System.Data; - using System.Data.SqlClient; static class SqlParameterCollectionExtension { diff --git a/src/SqlSessionStateProviderAsync/SqlSessionStateRepository.cs b/src/SqlSessionStateProviderAsync/SqlSessionStateRepository.cs index 2cd6a2e..950d65a 100644 --- a/src/SqlSessionStateProviderAsync/SqlSessionStateRepository.cs +++ b/src/SqlSessionStateProviderAsync/SqlSessionStateRepository.cs @@ -4,8 +4,8 @@ namespace Microsoft.AspNet.SessionState { using Resources; + using Microsoft.Data.SqlClient; using System; - using System.Data.SqlClient; using System.Runtime.CompilerServices; using System.Threading.Tasks; using System.Web; diff --git a/src/SqlSessionStateProviderAsync/SqlSessionStateRepositoryUtil.cs b/src/SqlSessionStateProviderAsync/SqlSessionStateRepositoryUtil.cs index 0c456ed..52473ab 100644 --- a/src/SqlSessionStateProviderAsync/SqlSessionStateRepositoryUtil.cs +++ b/src/SqlSessionStateProviderAsync/SqlSessionStateRepositoryUtil.cs @@ -4,10 +4,10 @@ namespace Microsoft.AspNet.SessionState { using Resources; + using Microsoft.Data.SqlClient; using System; using System.Data; - using System.Data.SqlClient; -using System.Runtime.CompilerServices; + using System.Runtime.CompilerServices; using System.Security.Principal; using System.Threading.Tasks; using System.Web; diff --git a/test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test.csproj b/test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test.csproj index f1a6647..ee9cc39 100644 --- a/test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test.csproj +++ b/test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test.csproj @@ -1,9 +1,5 @@  - - - - @@ -48,21 +44,9 @@ true - - ..\..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll - - - ..\..\packages\Moq.4.7.137\lib\net45\Moq.dll - - - ..\..\packages\System.Threading.Tasks.Extensions.4.4.0\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - ..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll - @@ -70,29 +54,12 @@ - - ..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll - True - - - ..\..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll - - - ..\..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll - - - ..\..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll - - - - - {7238f90d-3bce-4f40-a5ba-ea36ad484bd6} @@ -104,10 +71,33 @@ - + - + + 4.2.1 + + + 4.7.137 + + + 2.3.1 + + + 2.3.1 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + 2.3.1 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + 2.3.1 + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -115,15 +105,7 @@ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - -