Exemplo n.º 1
0
        public async Task Save(ReviewPodcastViewModel model)
        {
            var podcastId    = model.Id;
            var selectedTags = model.Tags.Where(x => x.IsChecked).Select(x => x.Id).ToList();

            _podcastService.AddPodcastEpisodes(podcastId);
            await _podcastRepository.SaveTags(podcastId, selectedTags);
        }
Exemplo n.º 2
0
        public ReviewPodcastViewModel GetPodcastForReview(int podcastId)
        {
            var podcast   = _podcastRepository.GetPodcast(podcastId);
            var tags      = _tagsRepository.GetAll();
            var viewModel = new ReviewPodcastViewModel
            {
                Id      = podcast.Id,
                Title   = podcast.Title,
                SiteUrl = podcast.SiteUrl
            };

            foreach (var tag in tags)
            {
                viewModel.Tags.Add(new CheckBoxListItem
                {
                    Id      = tag.TagId,
                    Display = tag.Name
                });
            }

            return(viewModel);
        }
Exemplo n.º 3
0
        public async Task <ActionResult> ReviewSubmission(ReviewPodcastViewModel model)
        {
            await _adminService.Save(model);

            return(RedirectToAction("Index"));
        }