Пример #1
0
 public ActionResult Edit(EditCardDto editCardDto)
 {
     try
     {
         var updatedCard = deckService.GetCard(editCardDto.CardId);
         updatedCard.Front = editCardDto.Front;
         updatedCard.Back  = editCardDto.Back;
         //updatedCard = CodeRenderHelper.DecodeCardForCode(updatedCard);
         updatedCard.Level = editCardDto.Level;
         deckService.EditCard(updatedCard);
         return(RedirectToAction(nameof(View), new { CardId = updatedCard.CardId }));
     }
     catch (Exception ex)
     {
         return(View());
     }
 }