in app/Data/AppUserStore.cs [20:35]
public async Task<IdentityResult> CreateAsync(AppUser user, CancellationToken cancellationToken)
{
cancellationToken.ThrowIfCancellationRequested();
if (user == null) throw new ArgumentNullException(nameof(user));
try
{
_context.Add(user);
await _context.SaveChangesAsync();
return IdentityResult.Success;
}
catch(Exception ex)
{
return IdentityResult.Failed(new IdentityError { Description = $"Could not insert user {ex.Message}." });
}
}