public async Task AddClaimAsync(string UserId, MyUserClaim claim) { var user = await FindByIdAsync(UserId); if (user == null) { throw new Exception("User does not exist"); } user.Claims.Add(claim); await _db.SaveChangesAsync(); }
public async Task AddClaimAsync(string UserId, MyUserClaim claim) { var user = await FindByIdAsync(UserId); if(user == null) { throw new Exception("User does not exist"); } user.Claims.Add(claim); await _db.SaveChangesAsync(); }