public IActionResult DeleteClaim(Guid id) { var claim = _dbContext.Set <UserClaim>() .Include(x => x.User) .FirstOrDefault(x => x.Id == id); return(View(ClaimModel.FromEntity(claim))); }
public async Task <IActionResult> DeleteClaim(Guid roleId, Guid claimId) { var role = await _dispatcher.DispatchAsync(new GetRoleQuery { Id = roleId, IncludeClaims = true, AsNoTracking = true }); var claim = role.Claims.FirstOrDefault(x => x.Id == claimId); return(View(ClaimModel.FromEntity(claim))); }
public IActionResult DeleteClaim(int id) { var claim = _configurationDbContext.Set <ClientClaim>() .Include(x => x.Client) .FirstOrDefault(x => x.Id == id); return(View(ClaimModel.FromEntity(claim))); }
public IActionResult DeleteClaim(Guid userId, Guid claimId) { var user = _dispatcher.Dispatch(new GetUserQuery { Id = userId, IncludeClaims = true, AsNoTracking = true }); var claim = user.Claims.FirstOrDefault(x => x.Id == claimId); return(View(ClaimModel.FromEntity(claim))); }