Skip to content

Commit

Permalink
Update referencies to latest versions (Kros-sk#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
satano authored Apr 16, 2021
1 parent 438c4b5 commit fc3d1a8
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 28 deletions.
Binary file removed src/Icon.ico
Binary file not shown.
13 changes: 10 additions & 3 deletions src/KormBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,18 @@ public KormBuilder UseDatabaseConfiguration(DatabaseConfigurationBase databaseCo
/// Initializes database for using Id generator.
/// </summary>
/// <returns>This instance.</returns>
public KormBuilder InitDatabaseForIdGenerator()
[Obsolete("Use InitDatabaseForIdGenerators() method.")]
public KormBuilder InitDatabaseForIdGenerator() => InitDatabaseForIdGenerators();

/// <summary>
/// Initializes database for using Id generator.
/// </summary>
/// <returns>This instance.</returns>
public KormBuilder InitDatabaseForIdGenerators()
{
IIdGeneratorFactory factory = IdGeneratorFactories.GetFactory(
using IIdGeneratorsForDatabaseInit idGenerators = IdGeneratorFactories.GetGeneratorsForDatabaseInit(
ConnectionSettings.ConnectionString, ConnectionSettings.KormProvider);
using (IIdGenerator idGenerator = factory.GetGenerator(string.Empty))
foreach (IIdGenerator idGenerator in idGenerators)
{
idGenerator.InitDatabaseForIdGenerator();
}
Expand Down
26 changes: 13 additions & 13 deletions src/Kros.KORM.Extensions.Asp.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Company>KROS a. s.</Company>
<Version>1.1.0-alpha.7</Version>
<Version>1.2.0</Version>
<Authors>KROS a. s.</Authors>
<Title>Kros.KORM.Extensions.Asp</Title>
<Description>Extensions for Kros.KORM library for ASP.NET Core projects.</Description>
Expand Down Expand Up @@ -34,25 +34,25 @@
<PackageProjectUrl>https://github.com/Kros-sk/Kros.KORM.Extensions.Asp</PackageProjectUrl>
<PackageTags>Kros;KORM;ASP.NET Core;Kros.KORM</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://en.gravatar.com/userimage/137934964/524e95fbd8c2e8779e02819ab6902bef.png</PackageIconUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/Kros-sk/Kros.KORM.Extensions.Asp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Include="Resources\icon.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Kros.KORM" Version="4.0.0-alpha.14" />
<PackageReference Include="Kros.KORM" Version="4.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<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="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="System.Text.Json" Version="4.7.0" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Binary file added src/Resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions tests/KormBuilderWithDatabaseShould.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ protected override string BaseConnectionString
}

[Fact]
public void InitDatabaseForIdGenerator()
public void InitDatabaseForIdGenerators()
{
var kormBuilder = new KormBuilder(new ServiceCollection(), ServerHelper.Connection.ConnectionString);
kormBuilder.InitDatabaseForIdGenerator();
kormBuilder.InitDatabaseForIdGenerators();

CheckTableAndProcedure();
}
Expand All @@ -45,6 +45,12 @@ private void CheckTableAndProcedure()

cmd.CommandText = "SELECT Count(*) FROM sys.procedures WHERE name = 'spGetNewId' AND type = 'P'";
((int)cmd.ExecuteScalar()).Should().Be(1);

cmd.CommandText = "SELECT Count(*) FROM sys.tables WHERE name = 'IdStoreInt64' AND type = 'U'";
((int)cmd.ExecuteScalar()).Should().Be(1);

cmd.CommandText = "SELECT Count(*) FROM sys.procedures WHERE name = 'spGetNewIdInt64' AND type = 'P'";
((int)cmd.ExecuteScalar()).Should().Be(1);
}
}
}
Expand Down
20 changes: 10 additions & 10 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>netcoreapp3.0</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<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="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Kros.Utils" Version="1.18.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<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 fc3d1a8

Please sign in to comment.