From 3f5ae3511520a2fd694a2b82226e7efc957c3624 Mon Sep 17 00:00:00 2001 From: Jon P Smith Date: Tue, 15 Aug 2023 14:53:30 +0100 Subject: [PATCH] Version 6.0.0 --- .../CreateNuGetRelease.nuspec | 16 +++++++++------- AuthPermissions.AspNetCore/MultiProjPack.xml | 8 ++++++-- ConsoleApp.AuthP6Upgrade/Program.cs | 4 ++-- .../FileStoreCacheFile.Production.json | 8 ++++++++ 4 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 Example6.MvcWebApp.Sharding/FileStoreCacheFile.Production.json diff --git a/AuthPermissions.AspNetCore/CreateNuGetRelease.nuspec b/AuthPermissions.AspNetCore/CreateNuGetRelease.nuspec index b3b1ed16..50a32b1f 100644 --- a/AuthPermissions.AspNetCore/CreateNuGetRelease.nuspec +++ b/AuthPermissions.AspNetCore/CreateNuGetRelease.nuspec @@ -2,16 +2,18 @@ AuthPermissions.AspNetCore - 5.0.1 + 6.0.0 Jon P Smith AuthPermissions.AspNetCore Copyright (c) 2021 Jon P Smith Provides extra authorization and multi-tenant features to a ASP.NET Core application. - - Minor improvements AccessDatabaseInformationJsonFile - - Minor improvements to SignInAndCreateTenant (better handling of errors) - - Minor improvements to IndividualUserAddUserManager (check password) - + - Significant changes to code to support sharding multi-tenant applications + - BREAKING CHANGES: Replaced the old services for handling sharding entries due to a limitation + - Improvement: The ability to define a sharding-only mode - see Configuring sharding > sharding-only mode + - Fix: The Sign up for a new tenant, with versioning now works with sharding-only tenants. + - Improvement: New service to simplify the create / delete of sharding-only tenants. + MIT https://github.com/JonPSmith/AuthPermissions.AspNetCore images\AuthPermissionsAspNetCoreNuGetIcon.png @@ -33,6 +35,7 @@ + @@ -41,7 +44,6 @@ - @@ -59,6 +61,7 @@ + @@ -67,7 +70,6 @@ - diff --git a/AuthPermissions.AspNetCore/MultiProjPack.xml b/AuthPermissions.AspNetCore/MultiProjPack.xml index 6970855f..e3ce64fd 100644 --- a/AuthPermissions.AspNetCore/MultiProjPack.xml +++ b/AuthPermissions.AspNetCore/MultiProjPack.xml @@ -4,13 +4,17 @@ AuthPermissions.AspNetCore - 5.1.0-preview002 + 6.0.0 Jon P Smith AuthPermissions.AspNetCore Copyright (c) 2021 Jon P Smith Provides extra authorization and multi-tenant features to a ASP.NET Core application. - - Minor improvement to set the default sharding data. + - Significant changes to code to support sharding multi-tenant applications + - BREAKING CHANGES: Replaced the old services for handling sharding entries due to a limitation + - Improvement: The ability to define a sharding-only mode - see Configuring sharding > sharding-only mode + - Fix: The Sign up for a new tenant, with versioning now works with sharding-only tenants. + - Improvement: New service to simplify the create / delete of sharding-only tenants. MIT https://github.com/JonPSmith/AuthPermissions.AspNetCore diff --git a/ConsoleApp.AuthP6Upgrade/Program.cs b/ConsoleApp.AuthP6Upgrade/Program.cs index 2fa5d48e..45a7a1c1 100644 --- a/ConsoleApp.AuthP6Upgrade/Program.cs +++ b/ConsoleApp.AuthP6Upgrade/Program.cs @@ -41,7 +41,7 @@ static void Main(string[] args) } var jsonString = File.ReadAllText(filePathToJsonFilePath); - Console.WriteLine(jsonString); + //Console.WriteLine(jsonString); var shardingData = JsonSerializer.Deserialize(jsonString)?.ShardingDatabases; if (shardingData == null || !shardingData.Any()) @@ -89,7 +89,7 @@ static void Main(string[] args) { var key = GetSetShardingEntriesFileStoreCache.ShardingEntryPrefix + shardingEntry.Name; readWriteService.SetClass(key, shardingEntry); - Console.WriteLine($"Added the sharding entry with the name of {shardingEntry.Name} added to the FileStore"); + Console.WriteLine($"Added the sharding entry with the name of '{shardingEntry.Name}' added to the FileStore"); } Console.WriteLine($"Successfully copied {shardingData.Count} sharding entry to the FileStore Cache called '{fileStoreName}'."); diff --git a/Example6.MvcWebApp.Sharding/FileStoreCacheFile.Production.json b/Example6.MvcWebApp.Sharding/FileStoreCacheFile.Production.json new file mode 100644 index 00000000..bda93087 --- /dev/null +++ b/Example6.MvcWebApp.Sharding/FileStoreCacheFile.Production.json @@ -0,0 +1,8 @@ +{ + "Cache": { + "ShardingEntry-Default Database": "{\r\n \"Name\": \"Default Database\",\r\n \"DatabaseName\": null,\r\n \"ConnectionName\": \"DefaultConnection\",\r\n \"DatabaseType\": \"SqlServer\"\r\n}", + "ShardingEntry-DatabaseWest1": "{\r\n \"Name\": \"DatabaseWest1\",\r\n \"DatabaseName\": \"asp.net-Example6.Sharding_West1\",\r\n \"ConnectionName\": \"WestCoastServer\",\r\n \"DatabaseType\": \"SqlServer\"\r\n}", + "ShardingEntry-DatabaseEast1": "{\r\n \"Name\": \"DatabaseEast1\",\r\n \"DatabaseName\": \"asp.net-Example6.Sharding_East1\",\r\n \"ConnectionName\": \"EastCoastServer\",\r\n \"DatabaseType\": \"SqlServer\"\r\n}" + }, + "TimeOuts": {} +} \ No newline at end of file