Fix db seeding, migration, repository services

This commit is contained in:
danial23 2025-05-19 22:22:33 -04:00
parent 872dc1e263
commit 6b87902ca7
Signed by: danial23
SSH key fingerprint: SHA256:IJ8VP0j2WMUVweTYnzUUnEjNgPnGx+mAt+RhqWZ01bU
22 changed files with 606 additions and 64 deletions

View file

@ -0,0 +1,18 @@
namespace CSR.Infrastructure.Services;
using CSR.Domain.Entities;
public class PasswordHasherService(Microsoft.AspNetCore.Identity.IPasswordHasher<User> passwordHasher) : Domain.Interfaces.IPasswordHasher
{
private readonly Microsoft.AspNetCore.Identity.IPasswordHasher<User> _passwordHasher = passwordHasher;
public string HashPassword(User user, string password)
{
return _passwordHasher.HashPassword(user, password);
}
public bool VerifyHashedPassword(User user, string hashedPassword, string providedPassword)
{
return _passwordHasher.VerifyHashedPassword(user, hashedPassword, providedPassword) != 0;
}
}