public async Task <IActionResult> Delete(ClientClaimModel model) { var result = await _clientClaimService.DeleteClientClaim(ClientMappers.Mapper.Map <ClientClaim>(model)); if (result) { SuccessNotification(await _localizationService.GetResourceAsync("Clients.ClientClaims.Deleted")); } return(RedirectToAction(nameof(Index), new { Id = model.ClientId })); }
public async Task <IActionResult> Create(ClientClaimModel model) { if (!ModelState.IsValid) { return(RedirectToAction(nameof(Index), new { id = model.Id })); } await _clientClaimService.InsertClientClaim(ClientMappers.Mapper.Map <ClientClaim>(model)); SuccessNotification(await _localizationService.GetResourceAsync("Clients.ClientClaims.Added")); return(RedirectToAction(nameof(Index), new { Id = model.ClientId })); }