/// <inheritdoc/> public override Task <IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); user.ThrowIfNull(nameof(user)); return(UsersTable.CreateAsync(user)); }
/// <inheritdoc/> public override async Task <IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); user.ThrowIfNull(nameof(user)); var created = await UsersTable.CreateAsync(user); return(created ? IdentityResult.Success : IdentityResult.Failed(new IdentityError { Code = string.Empty, Description = $"User '{user.UserName}' could not be created." })); }
public Task <IdentityResult> CreateAsync(ApplicationUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); user.ThrowIfNull(nameof(user)); return(_usersTable.CreateAsync(user)); }