/// <summary> /// Inserts a claim to the AspNetUserClaims table for the given user. /// </summary> /// <param name="user">User to have claim added.</param> /// <param name="claim">Claim to be added.</param> /// <returns></returns> public Task AddClaimAsync(TUser user, Claim claim) { if (user == null) { throw new ArgumentNullException("user"); } if (claim == null) { throw new ArgumentNullException("user"); } userClaimsTable.Insert(claim, user.Id); return(Task.FromResult <object>(null)); }
/// <summary> /// Inserts a claim to the AspNetUserClaims table for the given user. /// </summary> /// <param name="user">User to have claim added.</param> /// <param name="claim">Claim to be added.</param> /// <returns></returns> public Task AddClaimAsync(IdentityUser user, Claim claim) { if (user == null) { throw new ArgumentNullException(nameof(user)); } if (claim == null) { throw new ArgumentNullException(nameof(user)); } _userClaimsTable.Insert(claim, user.Id); return(Task.FromResult <Object>(null)); }