Skip to content

Commit 8c63305

Browse files
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 <[email protected]>
1 parent d018e70 commit 8c63305

11 files changed

+38
-79
lines changed

src/SqlSessionStateProviderAsync/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@
9292
<Name>Microsoft.AspNet.SessionState.SessionStateModule</Name>
9393
</ProjectReference>
9494
</ItemGroup>
95+
<ItemGroup>
96+
<PackageReference Include="Microsoft.Data.SqlClient">
97+
<Version>5.1.0</Version>
98+
</PackageReference>
99+
</ItemGroup>
95100
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
96101
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
97102
<PropertyGroup>

src/SqlSessionStateProviderAsync/SqlCommandExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
namespace Microsoft.AspNet.SessionState
55
{
6-
using System.Data.SqlClient;
76
using System.Diagnostics;
7+
using Microsoft.Data.SqlClient;
88

99
static class SqlCommandExtension
1010
{

src/SqlSessionStateProviderAsync/SqlCommandHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
namespace Microsoft.AspNet.SessionState
55
{
6+
using Microsoft.Data.SqlClient;
67
using System.Data;
7-
using System.Data.SqlClient;
88

99
class SqlCommandHelper
1010
{

src/SqlSessionStateProviderAsync/SqlInMemoryTableSessionStateRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
namespace Microsoft.AspNet.SessionState
55
{
66
using Resources;
7+
using Microsoft.Data.SqlClient;
78
using System;
8-
using System.Data.SqlClient;
99
using System.Diagnostics;
1010
using System.Runtime.CompilerServices;
1111
using System.Threading;

src/SqlSessionStateProviderAsync/SqlParameterCollectionExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace Microsoft.AspNet.SessionState
55
{
6+
using Microsoft.Data.SqlClient;
67
using System;
78
using System.Data;
8-
using System.Data.SqlClient;
99

1010
static class SqlParameterCollectionExtension
1111
{

src/SqlSessionStateProviderAsync/SqlSessionStateRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
namespace Microsoft.AspNet.SessionState
55
{
66
using Resources;
7+
using Microsoft.Data.SqlClient;
78
using System;
8-
using System.Data.SqlClient;
99
using System.Runtime.CompilerServices;
1010
using System.Threading.Tasks;
1111
using System.Web;

src/SqlSessionStateProviderAsync/SqlSessionStateRepositoryUtil.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
namespace Microsoft.AspNet.SessionState
55
{
66
using Resources;
7+
using Microsoft.Data.SqlClient;
78
using System;
89
using System.Data;
9-
using System.Data.SqlClient;
10-
using System.Runtime.CompilerServices;
10+
using System.Runtime.CompilerServices;
1111
using System.Security.Principal;
1212
using System.Threading.Tasks;
1313
using System.Web;

test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test.csproj

Lines changed: 25 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\..\packages\xunit.core.2.3.1\build\xunit.core.props" Condition="Exists('..\..\packages\xunit.core.2.3.1\build\xunit.core.props')" />
4-
<Import Project="..\..\packages\xunit.runner.console.2.3.1\build\xunit.runner.console.props" Condition="Exists('..\..\packages\xunit.runner.console.2.3.1\build\xunit.runner.console.props')" />
5-
<Import Project="..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props" Condition="Exists('..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props')" />
6-
<Import Project="..\..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props" Condition="Exists('..\..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props')" />
73
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
84
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Microsoft.Aspnet.SessionState.sln))\tools\SqlSessionStateProviderAsync.settings.targets" />
95
<PropertyGroup>
@@ -48,51 +44,22 @@
4844
<DelaySign>true</DelaySign>
4945
</PropertyGroup>
5046
<ItemGroup>
51-
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
52-
<HintPath>..\..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
53-
</Reference>
54-
<Reference Include="Moq, Version=4.7.137.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
55-
<HintPath>..\..\packages\Moq.4.7.137\lib\net45\Moq.dll</HintPath>
56-
</Reference>
5747
<Reference Include="System" />
5848
<Reference Include="System.Configuration" />
5949
<Reference Include="System.Core" />
60-
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
61-
<HintPath>..\..\packages\System.Threading.Tasks.Extensions.4.4.0\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
62-
</Reference>
63-
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
64-
<HintPath>..\..\packages\System.ValueTuple.4.4.0\lib\net461\System.ValueTuple.dll</HintPath>
65-
</Reference>
6650
<Reference Include="System.Web" />
6751
<Reference Include="System.Xml.Linq" />
6852
<Reference Include="System.Data.DataSetExtensions" />
6953
<Reference Include="Microsoft.CSharp" />
7054
<Reference Include="System.Data" />
7155
<Reference Include="System.Net.Http" />
7256
<Reference Include="System.Xml" />
73-
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
74-
<HintPath>..\..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
75-
<Private>True</Private>
76-
</Reference>
77-
<Reference Include="xunit.assert, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
78-
<HintPath>..\..\packages\xunit.assert.2.3.1\lib\netstandard1.1\xunit.assert.dll</HintPath>
79-
</Reference>
80-
<Reference Include="xunit.core, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
81-
<HintPath>..\..\packages\xunit.extensibility.core.2.3.1\lib\netstandard1.1\xunit.core.dll</HintPath>
82-
</Reference>
83-
<Reference Include="xunit.execution.desktop, Version=2.3.1.3858, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
84-
<HintPath>..\..\packages\xunit.extensibility.execution.2.3.1\lib\net452\xunit.execution.desktop.dll</HintPath>
85-
</Reference>
8657
</ItemGroup>
8758
<ItemGroup>
8859
<Compile Include="SqlCommandHelperTest.cs" />
8960
<Compile Include="SqlSessionStateAsyncProviderTest.cs" />
9061
<Compile Include="Properties\AssemblyInfo.cs" />
9162
</ItemGroup>
92-
<ItemGroup>
93-
<None Include="app.config" />
94-
<None Include="packages.config" />
95-
</ItemGroup>
9663
<ItemGroup>
9764
<ProjectReference Include="..\..\src\SessionStateModule\Microsoft.AspNet.SessionState.SessionStateModule.csproj">
9865
<Project>{7238f90d-3bce-4f40-a5ba-ea36ad484bd6}</Project>
@@ -104,26 +71,41 @@
10471
</ProjectReference>
10572
</ItemGroup>
10673
<ItemGroup>
107-
<Analyzer Include="..\..\packages\xunit.analyzers.0.7.0\analyzers\dotnet\cs\xunit.analyzers.dll" />
74+
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
10875
</ItemGroup>
10976
<ItemGroup>
110-
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
77+
<PackageReference Include="Castle.Core">
78+
<Version>4.2.1</Version>
79+
</PackageReference>
80+
<PackageReference Include="Moq">
81+
<Version>4.7.137</Version>
82+
</PackageReference>
83+
<PackageReference Include="xunit">
84+
<Version>2.3.1</Version>
85+
</PackageReference>
86+
<PackageReference Include="xunit.runner.console">
87+
<Version>2.3.1</Version>
88+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
89+
<PrivateAssets>all</PrivateAssets>
90+
</PackageReference>
91+
<PackageReference Include="xunit.runner.msbuild">
92+
<Version>2.3.1</Version>
93+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
94+
<PrivateAssets>all</PrivateAssets>
95+
</PackageReference>
96+
<PackageReference Include="xunit.runner.visualstudio">
97+
<Version>2.3.1</Version>
98+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
99+
<PrivateAssets>all</PrivateAssets>
100+
</PackageReference>
111101
</ItemGroup>
112102
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
113103
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
114104
<PropertyGroup>
115105
<ErrorText>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}.</ErrorText>
116106
</PropertyGroup>
117107
<Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />
118-
<Error Condition="!Exists('..\..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.visualstudio.2.3.1\build\net20\xunit.runner.visualstudio.props'))" />
119-
<Error Condition="!Exists('..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.props'))" />
120-
<Error Condition="!Exists('..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets'))" />
121-
<Error Condition="!Exists('..\..\packages\xunit.runner.console.2.3.1\build\xunit.runner.console.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.runner.console.2.3.1\build\xunit.runner.console.props'))" />
122-
<Error Condition="!Exists('..\..\packages\xunit.core.2.3.1\build\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.3.1\build\xunit.core.props'))" />
123-
<Error Condition="!Exists('..\..\packages\xunit.core.2.3.1\build\xunit.core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\xunit.core.2.3.1\build\xunit.core.targets'))" />
124108
</Target>
125-
<Import Project="..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets" Condition="Exists('..\..\packages\xunit.runner.msbuild.2.3.1\build\net452\xunit.runner.msbuild.targets')" />
126-
<Import Project="..\..\packages\xunit.core.2.3.1\build\xunit.core.targets" Condition="Exists('..\..\packages\xunit.core.2.3.1\build\xunit.core.targets')" />
127109
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
128110
Other similar extension points exist, see Microsoft.Common.targets.
129111
<Target Name="BeforeBuild">

test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/SqlCommandHelperTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
namespace Microsoft.AspNet.SessionState.SqlSessionStateAsyncProvider.Test
55
{
6+
using Microsoft.Data.SqlClient;
67
using System;
78
using System.Data;
8-
using System.Data.SqlClient;
99
using Xunit;
1010

1111
public class SqlCommandHelperTest

test/Microsoft.AspNet.SessionState.SqlSessionStateProviderAsync.Test/app.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)