Пример #1
0
        public ActionResult Create(CreateDeckDto createDeckDto)
        {
            try
            {
                var newDeck = new Deck()
                {
                    ResourceId = createDeckDto.ResourceId,
                    Title      = createDeckDto.Title,
                    IsShared   = createDeckDto.IsShared
                };
                deckService.AddDeck(newDeck);

                return(RedirectToAction(nameof(Index), new { ParentId = createDeckDto.ResourceId }));
            }
            catch (Exception ex)
            {
                return(View());
            }
        }