From 39690179def596d0eaec733fa25819f2b4ca03c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Louren=C3=A7o?= Date: Mon, 5 Sep 2022 00:17:08 -0300 Subject: [PATCH] Updated EntityFramework target framework. --- .config/dotnet-tools.json | 2 +- src/EntityFramework/host/Host.csproj | 20 +++++++++++++------ src/EntityFramework/host/Program.cs | 4 ++-- src/EntityFramework/host/Startup.cs | 6 +++--- .../migrations/SqlServer/SqlServer.csproj | 4 ++-- .../IdentityServer4.EntityFramework.csproj | 4 ++-- ...entityServer4.EntityFramework.Tests.csproj | 4 ++-- 7 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index db29a16b09..3418959e61 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "dotnet-ef": { - "version": "3.1.0", + "version": "6.0.8", "commands": [ "dotnet-ef" ] diff --git a/src/EntityFramework/host/Host.csproj b/src/EntityFramework/host/Host.csproj index 0fc6e1bebd..4d5a852a32 100644 --- a/src/EntityFramework/host/Host.csproj +++ b/src/EntityFramework/host/Host.csproj @@ -1,13 +1,21 @@ - + - netcoreapp3.1 + net6.0 - - - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + diff --git a/src/EntityFramework/host/Program.cs b/src/EntityFramework/host/Program.cs index ca520d3f0f..41da23d314 100644 --- a/src/EntityFramework/host/Program.cs +++ b/src/EntityFramework/host/Program.cs @@ -1,4 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. +// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. @@ -55,7 +55,7 @@ public static int Main(string[] args) } public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) + Microsoft.Extensions.Hosting.Host.CreateDefaultBuilder(args) .UseSerilog() .ConfigureWebHostDefaults(webBuilder => { diff --git a/src/EntityFramework/host/Startup.cs b/src/EntityFramework/host/Startup.cs index 0e67fbd602..876634037f 100644 --- a/src/EntityFramework/host/Startup.cs +++ b/src/EntityFramework/host/Startup.cs @@ -1,4 +1,4 @@ -// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. +// Copyright (c) Brock Allen & Dominick Baier. All rights reserved. // Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information. @@ -31,12 +31,12 @@ public void ConfigureServices(IServiceCollection services) // this adds the config data from DB (clients, resources, CORS) .AddConfigurationStore(options => { - options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString); + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, b => b.MigrationsAssembly("Host")); }) // this adds the operational data from DB (codes, tokens, consents) .AddOperationalStore(options => { - options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString); + options.ConfigureDbContext = builder => builder.UseSqlServer(connectionString, b => b.MigrationsAssembly("Host")); // this enables automatic token cleanup. this is optional. options.EnableTokenCleanup = true; diff --git a/src/EntityFramework/migrations/SqlServer/SqlServer.csproj b/src/EntityFramework/migrations/SqlServer/SqlServer.csproj index 5136d93842..1f4bc6fa74 100644 --- a/src/EntityFramework/migrations/SqlServer/SqlServer.csproj +++ b/src/EntityFramework/migrations/SqlServer/SqlServer.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.1 + net6.0 diff --git a/src/EntityFramework/src/IdentityServer4.EntityFramework.csproj b/src/EntityFramework/src/IdentityServer4.EntityFramework.csproj index 2941966a90..6a86fe7872 100644 --- a/src/EntityFramework/src/IdentityServer4.EntityFramework.csproj +++ b/src/EntityFramework/src/IdentityServer4.EntityFramework.csproj @@ -1,8 +1,8 @@ - + IdentityServer4.EntityFramework - netcoreapp3.1 + net6.0 EntityFramework persistence layer for IdentityServer4 Brock Allen;Dominick Baier;Scott Brady diff --git a/src/EntityFramework/test/IdentityServer4.EntityFramework.Tests/IdentityServer4.EntityFramework.Tests.csproj b/src/EntityFramework/test/IdentityServer4.EntityFramework.Tests/IdentityServer4.EntityFramework.Tests.csproj index dcf5c194cc..6e3c07f734 100644 --- a/src/EntityFramework/test/IdentityServer4.EntityFramework.Tests/IdentityServer4.EntityFramework.Tests.csproj +++ b/src/EntityFramework/test/IdentityServer4.EntityFramework.Tests/IdentityServer4.EntityFramework.Tests.csproj @@ -1,7 +1,7 @@ - + - netcoreapp3.1 + net6.0 false