From 7cfabe0af207979b739af15127fb30210ad0d61a Mon Sep 17 00:00:00 2001 From: "HOME-LAPTOP\\kshkulev" Date: Sat, 1 Nov 2025 20:41:21 +0900 Subject: [PATCH] Fix not resolving IPasswordHasher --- Hcs.WebApp/Data/Identity/AppIdentityDbContext.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Hcs.WebApp/Data/Identity/AppIdentityDbContext.cs b/Hcs.WebApp/Data/Identity/AppIdentityDbContext.cs index 126d287..dcce3b4 100644 --- a/Hcs.WebApp/Data/Identity/AppIdentityDbContext.cs +++ b/Hcs.WebApp/Data/Identity/AppIdentityDbContext.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; namespace Hcs.WebApp.Data.Identity { @@ -57,7 +56,7 @@ namespace Hcs.WebApp.Data.Identity LockoutEnabled = true }; - var passwordHasher = context.GetService>(); + var passwordHasher = new PasswordHasher(); adminUser.PasswordHash = passwordHasher.HashPassword(adminUser, AppUser.ADMINISTRATOR_PASSWORD); var entry = context.Set().Add(adminUser); @@ -120,7 +119,7 @@ namespace Hcs.WebApp.Data.Identity LockoutEnabled = true }; - var passwordHasher = context.GetService>(); + var passwordHasher = new PasswordHasher(); adminUser.PasswordHash = passwordHasher.HashPassword(adminUser, AppUser.ADMINISTRATOR_PASSWORD); var entry = context.Set().Add(adminUser);