Skip to content

Commit

Permalink
Merge pull request #217 from amodpandey/net5.0_update
Browse files Browse the repository at this point in the history
Net5.0 update and upgrade from System.Data.SqlClient to Microsoft.Data.SqlClient
  • Loading branch information
stuartpa authored Oct 6, 2023
2 parents 7c42c7f + 8c9fa08 commit f682bec
Show file tree
Hide file tree
Showing 173 changed files with 166 additions and 1,418 deletions.
6 changes: 0 additions & 6 deletions Samples/Dapper/App.config

This file was deleted.

15 changes: 6 additions & 9 deletions Samples/Dapper/ElasticDapper.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />

<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.30" />
<PackageReference Include="DapperExtensions.DotnetCore" Version="1.0.1" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="Dapper" Version="2.0.90" />
<PackageReference Include="DapperExtensions" Version="1.7.0" />
</ItemGroup>

<ItemGroup>
<None Include="App.config" />
<None Include="LICENSE" />
</ItemGroup>
</Project>
</Project>
5 changes: 2 additions & 3 deletions Samples/Dapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
using Dapper;
using DapperExtensions;
using System.Collections.Generic;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;

////////////////////////////////////////////////////////////////////////////////////////
// This sample illustrates the adjustments that need to be made to use Dapper
Expand Down
2 changes: 0 additions & 2 deletions Samples/Dapper/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
1 change: 0 additions & 1 deletion Samples/Dapper/Sharding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;

namespace ElasticDapper
Expand Down
20 changes: 0 additions & 20 deletions Samples/EFCodeFirst/App.config

This file was deleted.

20 changes: 0 additions & 20 deletions Samples/EFCodeFirst/App.config.LocalDb

This file was deleted.

2 changes: 0 additions & 2 deletions Samples/EFCodeFirst/ElasticScaleDbConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Configuration;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;

namespace EFCodeFirstElasticScale
{
Expand Down
16 changes: 8 additions & 8 deletions Samples/EFCodeFirst/EntityFrameworkCodeFirst.csproj
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />

<ItemGroup>
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
<PackageReference Include="EntityFramework" Version="6.4.0" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
</ItemGroup>

<ItemGroup>
<None Include="App.config" />
<None Include="LICENSE"/>
<None Include="LICENSE" />
</ItemGroup>
</Project>
<ItemGroup>
<Content Include="appsettings.json" />
</ItemGroup>
</Project>
2 changes: 0 additions & 2 deletions Samples/EFCodeFirst/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
5 changes: 5 additions & 0 deletions Samples/EFCodeFirst/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
}
}
20 changes: 0 additions & 20 deletions Samples/EFMultiTenant/App.config

This file was deleted.

2 changes: 0 additions & 2 deletions Samples/EFMultiTenant/ElasticScaleDbConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Configuration;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;

namespace EFMultiTenantElasticScale
{
Expand Down
21 changes: 9 additions & 12 deletions Samples/EFMultiTenant/EntityFrameworkMultiTenant.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />

<ItemGroup>
<None Include="App.config" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
<PackageReference Include="EntityFramework" Version="6.4.4" />
</ItemGroup>
<ItemGroup>
<None Include="ApplySqlToShards.ps1" />
<None Include="LICENSE" />
</ItemGroup>

<ItemGroup>
<Content Include="appsettings.json" />
<Content Include="EnableRLS.sql" />
<Content Include="RemoveRLS.sql" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
<PackageReference Include="EntityFramework" Version="6.4.0" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion Samples/EFMultiTenant/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System.Data.Entity.Infrastructure;
using System.Data.SqlClient;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;

////////////////////////////////////////////////////////////////////////////////////////
// This sample follows the CodeFirstNewDatabase Blogging tutorial for EF.
Expand Down
2 changes: 0 additions & 2 deletions Samples/EFMultiTenant/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Setting ComVisible to false makes the types in this assembly not visible
Expand Down
5 changes: 5 additions & 0 deletions Samples/EFMultiTenant/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"DevelopmentDatabase": "Data Source=(localdb)\\v11.0;Initial Catalog=elasticscaledev;Integrated Security=True"
}
}
37 changes: 0 additions & 37 deletions Samples/ElasticScaleStarterKit/App.config

This file was deleted.

1 change: 0 additions & 1 deletion Samples/ElasticScaleStarterKit/CreateShardSample.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;
Expand Down
13 changes: 6 additions & 7 deletions Samples/ElasticScaleStarterKit/ElasticScaleStarterKit.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />

<ItemGroup>
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Data.NetCore" Version="6.0.1312" />
<PackageReference Include="EnterpriseLibrary.TransientFaultHandling.NetCore" Version="6.0.1312" />
<PackageReference Include="EntityFramework" Version="6.4.0" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" Version="2.3.0" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<None Include="App.config" />
<None Include="LICENSE" />
<None Include="README.txt" />
<None Include="InitializeShard.sql">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
<ItemGroup>
<Content Include="appsettings.json" />
</ItemGroup>
</Project>
1 change: 0 additions & 1 deletion Samples/ElasticScaleStarterKit/ShardManagementUtils.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

using System;
using Microsoft.Azure.SqlDatabase.ElasticScale.ShardManagement;

namespace ElasticScaleStarterKit
Expand Down
7 changes: 7 additions & 0 deletions Samples/ElasticScaleStarterKit/appsettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ServerName": "(localdb)\\v11.0",
"IntegratedSecurity": true,
"UserName": "MyUserName",
"Password": "MyPassword",
"DatabaseEdition": "Basic"
}
8 changes: 2 additions & 6 deletions Samples/ShardSqlCmd/ShardSqlCmd.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net5.0</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Build.props))\Build.props" />

<ItemGroup>
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.0.0" />
<PackageReference Include="Microsoft.Azure.SqlDatabase.ElasticScale.Client" version="2.3.0" />
</ItemGroup>

<ItemGroup>
<None Include="LICENSE" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions Samples/ShardSqlCmd/packages.config

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System;
using System.Linq;
using System.Reflection;

namespace Microsoft.Azure.SqlDatabase.ElasticScale
{
Expand Down
Loading

0 comments on commit f682bec

Please sign in to comment.