Skip to content

Commit f682bec

Browse files
authored
Merge pull request #217 from amodpandey/net5.0_update
Net5.0 update and upgrade from System.Data.SqlClient to Microsoft.Data.SqlClient
2 parents 7c42c7f + 8c9fa08 commit f682bec

File tree

173 files changed

+166
-1418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+166
-1418
lines changed

Samples/Dapper/App.config

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

Samples/Dapper/ElasticDapper.csproj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFrameworks>net5.0</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
</PropertyGroup>
6-
76
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />
8-
97
<ItemGroup>
10-
<PackageReference Include="Dapper" Version="2.0.30" />
11-
<PackageReference Include="DapperExtensions.DotnetCore" Version="1.0.1" />
128
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
139
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
14-
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
10+
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.3.0" />
11+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
12+
<PackageReference Include="Dapper" Version="2.0.90" />
13+
<PackageReference Include="DapperExtensions" Version="1.7.0" />
1514
</ItemGroup>
16-
1715
<ItemGroup>
18-
<None Include="App.config" />
1916
<None Include="LICENSE" />
2017
</ItemGroup>
21-
</Project>
18+
</Project>

Samples/Dapper/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System;
5+
using System.Collections.Generic;
56
using System.Data.SqlClient;
6-
using System.Linq;
7-
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
87
using Dapper;
98
using DapperExtensions;
10-
using System.Collections.Generic;
9+
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
1110

1211
////////////////////////////////////////////////////////////////////////////////////////
1312
// This sample illustrates the adjustments that need to be made to use Dapper

Samples/Dapper/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System.Reflection;
5-
using System.Runtime.CompilerServices;
64
using System.Runtime.InteropServices;
75

86
// Setting ComVisible to false makes the types in this assembly not visible

Samples/Dapper/Sharding.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.Data.SqlClient;
5-
using System.Linq;
65
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
76

87
namespace ElasticDapper

Samples/EFCodeFirst/App.config

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

Samples/EFCodeFirst/App.config.LocalDb

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

Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.Configuration;
5-
using System.Data.Common;
65
using System.Data.Entity;
76
using System.Data.Entity.Infrastructure;
8-
using System.Data.SqlClient;
97

108
namespace EFCodeFirstElasticScale
119
{
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFrameworks>net5.0</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
</PropertyGroup>
6-
76
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />
8-
97
<ItemGroup>
108
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
119
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
12-
<PackageReference Include="EntityFramework" Version="6.4.0" />
1310
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
11+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
12+
<PackageReference Include="EntityFramework" Version="6.4.4" />
1413
</ItemGroup>
15-
1614
<ItemGroup>
17-
<None Include="App.config" />
18-
<None Include="LICENSE"/>
15+
<None Include="LICENSE" />
1916
</ItemGroup>
20-
</Project>
17+
<ItemGroup>
18+
<Content Include="appsettings.json" />
19+
</ItemGroup>
20+
</Project>

Samples/EFCodeFirst/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System.Reflection;
5-
using System.Runtime.CompilerServices;
64
using System.Runtime.InteropServices;
75

86
// Setting ComVisible to false makes the types in this assembly not visible

Samples/EFCodeFirst/appsettings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ConnectionStrings": {
3+
"DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
4+
}
5+
}

Samples/EFMultiTenant/App.config

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

Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

44
using System.Configuration;
5-
using System.Data.Common;
65
using System.Data.Entity;
76
using System.Data.Entity.Infrastructure;
8-
using System.Data.SqlClient;
97

108
namespace EFMultiTenantElasticScale
119
{
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFrameworks>net5.0</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
</PropertyGroup>
6-
76
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />
8-
97
<ItemGroup>
10-
<None Include="App.config" />
8+
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
9+
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
10+
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
11+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
12+
<PackageReference Include="EntityFramework" Version="6.4.4" />
13+
</ItemGroup>
14+
<ItemGroup>
1115
<None Include="ApplySqlToShards.ps1" />
1216
<None Include="LICENSE" />
1317
</ItemGroup>
14-
1518
<ItemGroup>
19+
<Content Include="appsettings.json" />
1620
<Content Include="EnableRLS.sql" />
1721
<Content Include="RemoveRLS.sql" />
1822
</ItemGroup>
19-
20-
<ItemGroup>
21-
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
22-
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
23-
<PackageReference Include="EntityFramework" Version="6.4.0" />
24-
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
25-
</ItemGroup>
2623
</Project>

Samples/EFMultiTenant/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Data.Entity.Infrastructure;
66
using System.Data.SqlClient;
77
using System.Linq;
8-
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
98

109
////////////////////////////////////////////////////////////////////////////////////////
1110
// This sample follows the CodeFirstNewDatabase Blogging tutorial for EF.

Samples/EFMultiTenant/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System.Reflection;
5-
using System.Runtime.CompilerServices;
64
using System.Runtime.InteropServices;
75

86
// Setting ComVisible to false makes the types in this assembly not visible
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ConnectionStrings": {
3+
"DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
4+
}
5+
}

Samples/ElasticScaleStarterKit/App.config

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

Samples/ElasticScaleStarterKit/CreateShardSample.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System;
54
using System.Collections.Generic;
65
using System.Linq;
76
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFrameworks>net5.0</TargetFrameworks>
44
<OutputType>Exe</OutputType>
55
</PropertyGroup>
6-
76
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />
8-
97
<ItemGroup>
108
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
119
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
12-
<PackageReference Include="EntityFramework" Version="6.4.0" />
1310
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
11+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
1412
</ItemGroup>
15-
1613
<ItemGroup>
17-
<None Include="App.config" />
1814
<None Include="LICENSE" />
1915
<None Include="README.txt" />
2016
<None Include="InitializeShard.sql">
2117
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2218
</None>
2319
</ItemGroup>
24-
</Project>
20+
<ItemGroup>
21+
<Content Include="appsettings.json" />
22+
</ItemGroup>
23+
</Project>

Samples/ElasticScaleStarterKit/ShardManagementUtils.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System;
54
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
65

76
namespace ElasticScaleStarterKit
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"ServerName": "(localdb)\\v11.0",
3+
"IntegratedSecurity": true,
4+
"UserName": "MyUserName",
5+
"Password": "MyPassword",
6+
"DatabaseEdition": "Basic"
7+
}
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>net5.0</TargetFrameworks>
55
<OutputType>Exe</OutputType>
66
</PropertyGroup>
7-
87
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />
9-
108
<ItemGroup>
11-
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.0.0" />
9+
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.3.0" />
1210
</ItemGroup>
13-
1411
<ItemGroup>
1512
<None Include="LICENSE" />
1613
</ItemGroup>
17-
1814
</Project>

Samples/ShardSqlCmd/packages.config

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

Src/ElasticScale.Client/ElasticScale.Common/ExceptionHandling/ExceptionExtensionMethods.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Linq;
6-
using System.Reflection;
76

87
namespace Microsoft.Azure.SqlDatabase.ElasticScale
98
{

0 commit comments

Comments
 (0)