Beispiel #1
0
        public async Task <IEnumerable <SessionModelResponse> > GetSessionsForFilm(int filmId)
        {
            DalFilmModel film = await _filmRepository.GetFilmById(filmId);

            if (film == null)
            {
                return(null);
            }

            IEnumerable <DataAccessLayer.Models.DataTransferObjects.SessionModelResponse> sessions =
                await _filmRepository.GetSessionsForFilm(filmId);

            return(sessions.Select(Mapper.Map <SessionModelResponse>));
        }
Beispiel #2
0
        public async Task <FilmModel> GetFilmsById(int id)
        {
            DalFilmModel film = await _filmRepository.GetFilmById(id);

            return(Mapper.Map <FilmModel>(film));
        }