From d379a43eb48475f2f375b95af3b5bb29fbc5578f Mon Sep 17 00:00:00 2001 From: darkstack <1835601+darkstack@users.noreply.github.com> Date: Sat, 25 Feb 2023 00:07:38 +0100 Subject: [PATCH] Bump to 6.0 --- LaDOSE.Src/LaDOSE.Api/LaDOSE.Api.csproj | 4 ++-- LaDOSE.Src/LaDOSE.Api/Startup.cs | 23 ++++++++++++------- LaDOSE.Src/LaDOSE.DTO/LaDOSE.DTO.csproj | 2 +- .../LaDOSE.DiscordBot.csproj | 2 +- LaDOSE.Src/LaDOSE.Entity/LaDOSE.Entity.csproj | 2 +- LaDOSE.Src/LaDOSE.REST/LaDOSE.REST.csproj | 2 +- .../LaDOSE.Service/LaDOSE.Business.csproj | 2 +- .../LaDOSE.Service/Service/UserService.cs | 1 - LaDOSE.Src/global.json | 7 ++++++ 9 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 LaDOSE.Src/global.json diff --git a/LaDOSE.Src/LaDOSE.Api/LaDOSE.Api.csproj b/LaDOSE.Src/LaDOSE.Api/LaDOSE.Api.csproj index 6bff4ba..310fa0f 100644 --- a/LaDOSE.Src/LaDOSE.Api/LaDOSE.Api.csproj +++ b/LaDOSE.Src/LaDOSE.Api/LaDOSE.Api.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 AnyCPU;x64 @@ -16,7 +16,7 @@ - + diff --git a/LaDOSE.Src/LaDOSE.Api/Startup.cs b/LaDOSE.Src/LaDOSE.Api/Startup.cs index 3846d4d..09b1c77 100644 --- a/LaDOSE.Src/LaDOSE.Api/Startup.cs +++ b/LaDOSE.Src/LaDOSE.Api/Startup.cs @@ -72,14 +72,21 @@ namespace LaDOSE.Api x.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore; x.SerializerSettings.MaxDepth= 4; }); - services.AddDbContextPool( // replace "YourDbContext" with the class name of your DbContext - options => options.UseMySql($"Server={MySqlServer};Database={MySqlDatabase};User={MySqlUser};Password={MySqlPassword};", // replace with your Connection String - mysqlOptions => - { - mysqlOptions.ServerVersion(new Version(10, 1, 16), ServerType.MariaDb); // replace with your Server Version and Type - } - )); - + // services.AddDbContextPool( // replace "YourDbContext" with the class name of your DbContext + // + // options => options.UseMySql($"Server={MySqlServer};Database={MySqlDatabase};User={MySqlUser};Password={MySqlPassword};", // replace with your Connection String + // mysqlOptions => + // { + // mysqlOptions.ServerVersion(new Version(10, 1, 16), ServerType.MariaDb); // replace with your Server Version and Type + // } + // )); + services.AddDbContextPool(options => + { + options.UseMySql( + $"Server={MySqlServer};Database={MySqlDatabase};User={MySqlUser};Password={MySqlPassword};", + new MariaDbServerVersion(new Version(10, 1))); + }); + var key = Encoding.ASCII.GetBytes(this.Configuration["JWTTokenSecret"]); services.AddAuthentication(x => { diff --git a/LaDOSE.Src/LaDOSE.DTO/LaDOSE.DTO.csproj b/LaDOSE.Src/LaDOSE.DTO/LaDOSE.DTO.csproj index 669148b..9e8bc4a 100644 --- a/LaDOSE.Src/LaDOSE.DTO/LaDOSE.DTO.csproj +++ b/LaDOSE.Src/LaDOSE.DTO/LaDOSE.DTO.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + net6.0 AnyCPU;x64 diff --git a/LaDOSE.Src/LaDOSE.DiscordBot/LaDOSE.DiscordBot.csproj b/LaDOSE.Src/LaDOSE.DiscordBot/LaDOSE.DiscordBot.csproj index 5fe63c1..16bc461 100644 --- a/LaDOSE.Src/LaDOSE.DiscordBot/LaDOSE.DiscordBot.csproj +++ b/LaDOSE.Src/LaDOSE.DiscordBot/LaDOSE.DiscordBot.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net6.0 AnyCPU;x64 diff --git a/LaDOSE.Src/LaDOSE.Entity/LaDOSE.Entity.csproj b/LaDOSE.Src/LaDOSE.Entity/LaDOSE.Entity.csproj index df42621..765e488 100644 --- a/LaDOSE.Src/LaDOSE.Entity/LaDOSE.Entity.csproj +++ b/LaDOSE.Src/LaDOSE.Entity/LaDOSE.Entity.csproj @@ -1,8 +1,8 @@ - netcoreapp3.1 AnyCPU;x64 + net6.0;netcoreapp3.1 diff --git a/LaDOSE.Src/LaDOSE.REST/LaDOSE.REST.csproj b/LaDOSE.Src/LaDOSE.REST/LaDOSE.REST.csproj index 2393b06..f045f2c 100644 --- a/LaDOSE.Src/LaDOSE.REST/LaDOSE.REST.csproj +++ b/LaDOSE.Src/LaDOSE.REST/LaDOSE.REST.csproj @@ -1,7 +1,7 @@ - netstandard2.0 + net6.0 AnyCPU;x64 diff --git a/LaDOSE.Src/LaDOSE.Service/LaDOSE.Business.csproj b/LaDOSE.Src/LaDOSE.Service/LaDOSE.Business.csproj index 756e717..c8bc3a1 100644 --- a/LaDOSE.Src/LaDOSE.Service/LaDOSE.Business.csproj +++ b/LaDOSE.Src/LaDOSE.Service/LaDOSE.Business.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net6.0 LaDOSE.Business LaDOSE.Business AnyCPU;x64 diff --git a/LaDOSE.Src/LaDOSE.Service/Service/UserService.cs b/LaDOSE.Src/LaDOSE.Service/Service/UserService.cs index 115ee68..8dd39bf 100644 --- a/LaDOSE.Src/LaDOSE.Service/Service/UserService.cs +++ b/LaDOSE.Src/LaDOSE.Service/Service/UserService.cs @@ -20,7 +20,6 @@ namespace LaDOSE.Business.Service { if (string.IsNullOrEmpty(username) || string.IsNullOrEmpty(password)) return null; - var user = _context.ApplicationUser.SingleOrDefault(x => x.Username == username); // check if username exists diff --git a/LaDOSE.Src/global.json b/LaDOSE.Src/global.json new file mode 100644 index 0000000..9e5e1fd --- /dev/null +++ b/LaDOSE.Src/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "6.0.0", + "rollForward": "latestMajor", + "allowPrerelease": true + } +} \ No newline at end of file