public async Task <IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken) { if (user != null) { int deleteResult = await userTable.Delete(user, cancellationToken); if (deleteResult > 0) { return(IdentityResult.Success); } else { return(IdentityResult.Failed(new IdentityError() { Code = deleteResult.ToString(), Description = "Error during user deletion" })); } } else { return(IdentityResult.Failed(new IdentityError() { Code = "404", Description = "User is null" })); } }
public async Task DeleteUser(string userid) { await _userTable.Delete(userid); }