Beispiel #1
0
        public IActionResult Create(Guid id)
        {
            var model = new PodcastCreateModel {
                CategoryId = id
            };

            return(View(model));
        }
Beispiel #2
0
        public async Task <IActionResult> Create(PodcastCreateModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var id = Guid.NewGuid();
            await _commands.Send(new CreatePodcastCommand { Id = id, Link = model.Link, CategoryId = model.CategoryId });

            return(RedirectToAction("ForPodcastCreation", "Wait", new { Id = id }));
        }