Exemple #1
0
        // GET: Podcast
        public ActionResult Index()
        {
            var podcasts      = _podcastRepository.GetPodcasts();
            var podcastModels = Mapper.Map <IEnumerable <Podcast>, IEnumerable <PodcastModel> >(podcasts);

            return(View(podcastModels));
        }
Exemple #2
0
        public async Task <IEnumerable <IPodcastModel> > GetPodcasts()
        {
            IEnumerable <Podcast> podcasts = await _podcastRepository.GetPodcasts();

            IEnumerable <IPodcastModel> podcastModels = await _podcastModelMapper.Map(podcasts);

            return(podcastModels);
        }