public Task RemoveClaimAsync(TUser user, Claim claim) { if (user == null) { throw new ArgumentNullException("user"); } user.Claims.RemoveAll(x => x.ClaimType == claim.Type && x.ClaimValue == claim.Value); _userClaimRepository.Delete(user, claim); return(Task.FromResult(0)); }
public Task RemoveClaimAsync(TUser user, Claim claim) { if (user == null) { throw new ArgumentNullException("user"); } if (claim == null) { throw new ArgumentNullException("claim"); } UserClaimRepository.Delete(UserClaimRepository.GetByWhere(new Dictionary <string, object> { { "UserId", user.Id }, { "ClaimType", claim.Type }, { "ClaimValue", claim.Value } }).First()); return(Task.FromResult <object>(null)); }