From 33326866f95bfa87072e3d77150eb95b7bcd8ead Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 15 Jan 2025 12:45:59 +0100 Subject: [PATCH] =?UTF-8?q?feat(DIExtensions):=20AddUserManager=20hinzugef?= =?UTF-8?q?=C3=BCgt,=20um=20mit=20db-Kontext=20hinzuzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DigitalData.UserManager.Application/DIExtensions.cs | 10 ++++++++++ DigitalData.UserManager.sln | 12 ++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/DigitalData.UserManager.Application/DIExtensions.cs b/DigitalData.UserManager.Application/DIExtensions.cs index fcbedbd..a8bbda8 100644 --- a/DigitalData.UserManager.Application/DIExtensions.cs +++ b/DigitalData.UserManager.Application/DIExtensions.cs @@ -44,6 +44,16 @@ namespace DigitalData.UserManager.Application .AddScoped() .AddScoped(); + /// + /// Adds the UserManager services and repositories to the specified . + /// This method registers the necessary mappings, repositories, services and for the UserManager. + /// + /// The IServiceCollection to which the services will be added. + /// The updated IServiceCollection. + public static IServiceCollection AddUserManager(this IServiceCollection services, string connectionString)=> services + .AddDbContext(options => options.UseSqlServer(connectionString).EnableSensitiveDataLogging()) + .AddUserManager(); + public static IServiceCollection AddEncryptor(this IServiceCollection services, IConfiguration configuration) { services.AddSingleton(); diff --git a/DigitalData.UserManager.sln b/DigitalData.UserManager.sln index 895995a..bf00f6a 100644 --- a/DigitalData.UserManager.sln +++ b/DigitalData.UserManager.sln @@ -17,16 +17,16 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Debug|Any CPU.Build.0 = Release|Any CPU {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC8CEADC-F7D6-4469-8718-4B308C386B4D}.Release|Any CPU.Build.0 = Release|Any CPU - {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Debug|Any CPU.Build.0 = Release|Any CPU {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.ActiveCfg = Release|Any CPU {0634853C-C515-48AF-8E27-E5CBF592BCE7}.Release|Any CPU.Build.0 = Release|Any CPU - {1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {1DD81373-82F9-4872-95C6-888624DB1797}.Debug|Any CPU.Build.0 = Release|Any CPU {1DD81373-82F9-4872-95C6-888624DB1797}.Release|Any CPU.ActiveCfg = Release|Any CPU {1DD81373-82F9-4872-95C6-888624DB1797}.Release|Any CPU.Build.0 = Release|Any CPU {07CCD651-647C-49F7-9715-30CEBC13710D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU