Esempio n. 1
0
        public async Task <ActionResult> Index(PodcastViewModel model)
        {
            if (!ModelState.IsValid)
            {
                // TODO: Ensure podcasts are posted instead of getting them from service.
                model.Podcasts = _podcastService.GetPodcasts();
                return(View(model));
            }

            await _podcastService.AddPodcast(model.FeedUrl);

            return(RedirectToAction("Index"));
        }