コード例 #1
0
        public virtual async Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input)
        {
            var user = await UserManager.GetByIdAsync(id);

            var oldClaim = new Claim(input.ClaimType, input.ClaimValue);
            var newClaim = new Claim(input.ClaimType, input.NewClaimValue);

            user.ReplaceClaim(oldClaim, newClaim);
            (await UserManager.UpdateAsync(user)).CheckErrors();

            await CurrentUnitOfWork.SaveChangesAsync();
        }
コード例 #2
0
 public virtual async Task UpdateClaimAsync(Guid id, IdentityUserClaimUpdateDto input)
 {
     await UserAppService.UpdateClaimAsync(id, input);
 }