Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Type,Value")] Claim claim)
        {
            if (id != claim.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    await _claimService.EditAsync(_mapper.Map <Claim, ClaimBase>(claim));
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!await ClaimExists(claim.Id))
                    {
                        return(NotFound());
                    }
                    throw;
                }
                return(RedirectToAction("Index"));
            }
            return(View(claim));
        }