net 6 migration
This commit is contained in:
		| @@ -1,11 +1,12 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0-rc.2.21480.5"/> | 		<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"/> | 		<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> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<ProjectReference Include="..\..\Datamodels\Datamodels.csproj"/> | 		<ProjectReference Include="..\..\Datamodels\Datamodels.csproj" /> | ||||||
| 		<ProjectReference Include="..\..\Repositories\Repositories.csproj"/> | 		<ProjectReference Include="..\..\Repositories\Repositories.csproj" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| 	<PropertyGroup> | 	<PropertyGroup> | ||||||
| 		<TargetFramework>net6.0</TargetFramework> | 		<TargetFramework>net6.0</TargetFramework> | ||||||
|   | |||||||
| @@ -5,6 +5,7 @@ | |||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  |  | ||||||
|   <ItemGroup> |   <ItemGroup> | ||||||
|  |     <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" /> | ||||||
|     <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> |     <PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||||
|   </ItemGroup> |   </ItemGroup> | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ namespace Repositories | |||||||
|         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) |         protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) | ||||||
|         { |         { | ||||||
|  |  | ||||||
|             optionsBuilder.UseMySql(_connectionString); |             optionsBuilder.UseMySql(_connectionString, ServerVersion.AutoDetect(_connectionString)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         public DbSet<LookupCategory> LookupCategories { get; set; } |         public DbSet<LookupCategory> LookupCategories { get; set; } | ||||||
|   | |||||||
| @@ -8,6 +8,7 @@ using Repositories.Interfaces; | |||||||
| using Microsoft.EntityFrameworkCore; | using Microsoft.EntityFrameworkCore; | ||||||
| using Microsoft.Extensions.Logging; | using Microsoft.Extensions.Logging; | ||||||
| using Microsoft.Extensions.Configuration; | using Microsoft.Extensions.Configuration; | ||||||
|  | using System.Configuration; | ||||||
|  |  | ||||||
| namespace Repositories | namespace Repositories | ||||||
| { | { | ||||||
| @@ -30,7 +31,7 @@ namespace Repositories | |||||||
|                 } |                 } | ||||||
|                 else |                 else | ||||||
|                 { |                 { | ||||||
|                     string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Get<string>(); |                     string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Value; | ||||||
|                     string connectionString = configuration.GetConnectionString(usedDb); |                     string connectionString = configuration.GetConnectionString(usedDb); | ||||||
|                     _dbContext._connectionString = connectionString; |                     _dbContext._connectionString = connectionString; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -33,7 +33,7 @@ namespace Repositories | |||||||
|                 } |                 } | ||||||
|                 else |                 else | ||||||
|                 { |                 { | ||||||
|                     string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Get<string>(); |                     string usedDb = configuration.GetSection("GeneralSettings").GetSection("DbToUse").Value; | ||||||
|                     string connectionString = configuration.GetConnectionString(usedDb); |                     string connectionString = configuration.GetConnectionString(usedDb); | ||||||
|                     _dbContext._connectionString = connectionString; |                     _dbContext._connectionString = connectionString; | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -1,16 +1,17 @@ | |||||||
| <Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<ProjectReference Include="..\Datamodels\Datamodels.csproj"/> | 		<ProjectReference Include="..\Datamodels\Datamodels.csproj" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-rc.2.21480.5"/> | 		<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0-rc.2.21480.5" /> | ||||||
| 		<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.2.21480.5"> | 		<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.2.21480.5"> | ||||||
| 			<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | 			<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||||||
| 			<PrivateAssets>all</PrivateAssets> | 			<PrivateAssets>all</PrivateAssets> | ||||||
| 		</PackageReference> | 		</PackageReference> | ||||||
| 		<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0-preview.7"/> | 		<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" /> | ||||||
| 		<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0-rc.2.21480.5"/> | 		<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0-preview.7" /> | ||||||
| 		<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0-rc.2.21480.5"/> | 		<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" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| 	<PropertyGroup> | 	<PropertyGroup> | ||||||
| 		<TargetFramework>net6.0</TargetFramework> | 		<TargetFramework>net6.0</TargetFramework> | ||||||
|   | |||||||
| @@ -4,33 +4,34 @@ | |||||||
| 		<LangVersion>10</LangVersion> | 		<LangVersion>10</LangVersion> | ||||||
| 	</PropertyGroup> | 	</PropertyGroup> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<PackageReference Include="Elastic.Apm.EntityFrameworkCore" Version="1.11.1"/> | 		<PackageReference Include="Elastic.Apm.EntityFrameworkCore" Version="1.11.1" /> | ||||||
| 		<PackageReference Include="Elastic.Apm.NetCoreAll" 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.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.0-rc.2.21480.10" /> | ||||||
| 		<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/> | 		<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-rc.2.21480.5" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta2"/> | 		<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.1.0"/> | 		<PackageReference Include="OpenTelemetry.Contrib.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta2" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.1.0"/> | 		<PackageReference Include="OpenTelemetry.Exporter.Console" Version="1.1.0" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc7"/> | 		<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.1.0" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc7"/> | 		<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc7" /> | ||||||
| 		<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc7"/> | 		<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc7" /> | ||||||
| 		<PackageReference Include="Serilog.AspNetCore" Version="4.1.0"/> | 		<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.0.0-rc7" /> | ||||||
| 		<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0"/> | 		<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" /> | ||||||
| 		<PackageReference Include="Serilog.Enrichers.ExceptionStackTraceHash" Version="1.3.0"/> | 		<PackageReference Include="Serilog.Enrichers.Environment" Version="2.2.0" /> | ||||||
| 		<PackageReference Include="Serilog.Exceptions" Version="7.1.0"/> | 		<PackageReference Include="Serilog.Enrichers.ExceptionStackTraceHash" Version="1.3.0" /> | ||||||
| 		<PackageReference Include="Serilog.Formatting.Elasticsearch" Version="8.4.1"/> | 		<PackageReference Include="Serilog.Exceptions" Version="7.1.0" /> | ||||||
| 		<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0"/> | 		<PackageReference Include="Serilog.Formatting.Elasticsearch" Version="8.4.1" /> | ||||||
| 		<PackageReference Include="serilog.sinks.console" Version="4.0.0"/> | 		<PackageReference Include="Serilog.Settings.Configuration" Version="3.3.0" /> | ||||||
| 		<PackageReference Include="Serilog.Sinks.ElasticSearch" Version="8.4.1"/> | 		<PackageReference Include="serilog.sinks.console" Version="4.0.0" /> | ||||||
| 		<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.2"/> | 		<PackageReference Include="Serilog.Sinks.ElasticSearch" Version="8.4.1" /> | ||||||
| 		<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.2.2"/> | 		<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.2" /> | ||||||
| 		<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.2.2"/> | 		<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.2.2" /> | ||||||
| 		<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.2.2"/> | 		<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.2.2" /> | ||||||
|  | 		<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.2.2" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| 	<ItemGroup> | 	<ItemGroup> | ||||||
| 		<ProjectReference Include="..\BusinessLogic\LookupLogic\LookupLogic.csproj"/> | 		<ProjectReference Include="..\BusinessLogic\LookupLogic\LookupLogic.csproj" /> | ||||||
| 		<ProjectReference Include="..\BusinessLogic\SearchLogic\SearchLogic.csproj"/> | 		<ProjectReference Include="..\BusinessLogic\SearchLogic\SearchLogic.csproj" /> | ||||||
| 		<ProjectReference Include="..\Datamodels\Datamodels.csproj"/> | 		<ProjectReference Include="..\Datamodels\Datamodels.csproj" /> | ||||||
| 		<ProjectReference Include="..\Repositories\Repositories.csproj"/> | 		<ProjectReference Include="..\Repositories\Repositories.csproj" /> | ||||||
| 	</ItemGroup> | 	</ItemGroup> | ||||||
| </Project> | </Project> | ||||||
		Reference in New Issue
	
	Block a user