コード例 #1
0
ファイル: UserOnlyStore.cs プロジェクト: mcshaz/Daarto
 /// <inheritdoc/>
 public override Task <IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken)
 {
     cancellationToken.ThrowIfCancellationRequested();
     ThrowIfDisposed();
     user.ThrowIfNull(nameof(user));
     return(UsersTable.DeleteAsync(user.Id));
 }
コード例 #2
0
        /// <inheritdoc/>
        public override async Task <IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken)
        {
            cancellationToken.ThrowIfCancellationRequested();
            ThrowIfDisposed();
            user.ThrowIfNull(nameof(user));
            var deleted = await UsersTable.DeleteAsync(user.Id);

            return(deleted ? IdentityResult.Success : IdentityResult.Failed(new IdentityError {
                Code = string.Empty,
                Description = $"User '{user.UserName}' could not be deleted."
            }));
        }
コード例 #3
0
 public Task <IdentityResult> DeleteAsync(ApplicationUser user, CancellationToken cancellationToken = default(CancellationToken))
 {
     cancellationToken.ThrowIfCancellationRequested();
     user.ThrowIfNull(nameof(user));
     return(_usersTable.DeleteAsync(user));
 }