public async Task RegisterUser(RegisterUserDTO dto) { var newUser = new User() { Email = dto.Email, DateOfBirth = dto.DateOfBirth, Nationality = dto.Nationality, RoleId = dto.RoleId }; var hashedPassword = _passwordHasher.HashPassword(newUser, dto.Password); newUser.PasswordHash = hashedPassword; await _efCoreAccountRepository.RegisterUser(newUser); }