This commit is contained in:
2023-08-04 20:10:57 +03:00
parent 70edf34cf6
commit 0d45061d81
14 changed files with 866 additions and 35 deletions
@@ -50,7 +50,7 @@ public class UserStore :
return Task.FromResult(0);
}
public async Task<IdentityResult> CreateAsync(ApplicationUser<Guid> user, CancellationToken cancellationToken)
public Task<IdentityResult> CreateAsync(ApplicationUser<Guid> user, CancellationToken cancellationToken)
{
var result = _userRepository.AddUser(new User
{
@@ -65,10 +65,10 @@ public class UserStore :
IsEmailConfirmed = user.IsEmailConfirmed
});
return result == 1 ? IdentityResult.Success : IdentityResult.Failed();
return Task.FromResult(result == 1 ? IdentityResult.Success : IdentityResult.Failed());
}
public async Task<IdentityResult> UpdateAsync(ApplicationUser<Guid> user, CancellationToken cancellationToken)
public Task<IdentityResult> UpdateAsync(ApplicationUser<Guid> user, CancellationToken cancellationToken)
{
var userDb = new User
{
@@ -84,7 +84,7 @@ public class UserStore :
};
var result = _userRepository.UpdateUser(userDb);
return result == 1 ? IdentityResult.Success : IdentityResult.Failed();
return Task.FromResult(result == 1 ? IdentityResult.Success : IdentityResult.Failed());
}
public Task<IdentityResult> DeleteAsync(ApplicationUser<Guid> user, CancellationToken cancellationToken)