public IActionResult AddAflevering(PodcastAfleveringCreateViewModel model) { _context.PodcastAfleveringen.Add(new PodcastAflevering() { Titel = model.Titel, Guests = model.Guests, PodcastId = model.PodcastId }); _context.SaveChanges(); return(RedirectToAction("Details", new { id = model.PodcastId })); }
public IActionResult AddAflevering(int id) { PodcastAfleveringCreateViewModel model = new PodcastAfleveringCreateViewModel() { PodcastId = id }; return(View(model)); }