net 6 migration
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0-rc.2.21480.5" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Repositories
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
|
||||
optionsBuilder.UseMySql(_connectionString);
|
||||
optionsBuilder.UseMySql(_connectionString, ServerVersion.AutoDetect(_connectionString));
|
||||
}
|
||||
|
||||
public DbSet<LookupCategory> LookupCategories { get; set; }
|
||||
|
||||
@@ -8,6 +8,7 @@ using Repositories.Interfaces;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using System.Configuration;
|
||||
|
||||
namespace Repositories
|
||||
{
|
||||
@@ -30,7 +31,7 @@ namespace Repositories
|
||||
}
|
||||
else
|
||||
{
|
||||
string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Get<string>();
|
||||
string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Value;
|
||||
string connectionString = configuration.GetConnectionString(usedDb);
|
||||
_dbContext._connectionString = connectionString;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Repositories
|
||||
}
|
||||
else
|
||||
{
|
||||
string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Get<string>();
|
||||
string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Value;
|
||||
string connectionString = configuration.GetConnectionString(usedDb);
|
||||
_dbContext._connectionString = connectionString;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0-preview.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0-rc.2.21480.5" />
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<PackageReference Include="Elastic.Apm.EntityFrameworkCore" Version="1.11.1" />
|
||||
<PackageReference Include="Elastic.Apm.NetCoreAll" Version="1.11.1" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0-rc.2.21480.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta2" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.1.0" />
|
||||
|
||||
Reference in New Issue
Block a user