Skip to content

Commit

Permalink
Replace System.Data.SqlClient with Microsoft.Data.SqlClient (Kros-sk#16)
Browse files Browse the repository at this point in the history
* https://devblogs.microsoft.com/dotnet/introducing-the-new-microsoftdatasqlclient/
* .NET Core 3, update packages
* Support appsettings.local.json
  • Loading branch information
satano authored Dec 13, 2019
1 parent 3597cc7 commit 378cb75
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

appsettings.local.json

# CodeRush
.cr

Expand Down
16 changes: 8 additions & 8 deletions src/Kros.KORM.Extensions.Asp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Company>KROS a. s.</Company>
<Version>1.1.0-alpha.5</Version>
<Authors>KROS a. s.</Authors>
Expand Down Expand Up @@ -30,14 +30,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Kros.KORM" Version="4.0.0-alpha.9" />
<PackageReference Include="Kros.KORM" Version="4.0.0-alpha.14" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="2.2.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="System.Text.Json" Version="4.6.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="System.Text.Json" Version="4.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion tests/ConfigurationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ namespace Kros.KORM.Extensions.Api.UnitTests
internal class ConfigurationHelper
{
public static IConfigurationRoot GetConfiguration()
=> new ConfigurationBuilder().AddJsonFile("appsettings.json").Build();
=> new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.local.json", optional: true)
.Build();
}
}
2 changes: 1 addition & 1 deletion tests/KormBuilderWithDatabaseShould.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
using Kros.Data;
using Kros.KORM.Extensions.Asp;
using Kros.UnitTests;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System.Data.SqlClient;
using Xunit;

namespace Kros.KORM.Extensions.Api.UnitTests
Expand Down
16 changes: 8 additions & 8 deletions tests/Kros.KORM.Extensions.Api.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<TargetFramework>netcoreapp3.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.7.0" />
<PackageReference Include="Kros.Utils" Version="1.9.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="Kros.Utils" Version="1.11.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 378cb75

Please sign in to comment.