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);