Example #1
0
        public async Task <IEnumerable <ShowDomainModel> > GetFutureShowsByPieceId(int id)
        {
            var shows = await _showsRepository.GetFutureShowsByPieceIdAsync(id);

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

            var showsList = shows.Select(show => new ShowDomainModel
            {
                Id           = show.Id,
                AuditoriumId = show.AuditoriumId,
                PieceId      = show.PieceId,
                ShowTime     = show.ShowTime,
                TicketPrice  = show.TicketPrice
            });

            return(showsList);
        }