public ActionResult Create(CreateCardDto createCardDto) { try { var newCard = new Card() { DeckId = createCardDto.DeckId, Front = createCardDto.Front, Back = createCardDto.Back, Level = createCardDto.Level }; //newCard = CodeRenderHelper.DecodeCardForCode(newCard); deckService.AddCard(newCard); return(RedirectToAction(nameof(View), new { CardId = newCard.CardId })); } catch (Exception ex) { return(View()); } }