예제 #1
0
        public async Task <ActionResult <IEnumerable <ShowPieceActorAuditoriumTheatreDomainModel> > > GetAllShows([FromQuery] ShowQuery showQuery)
        {
            IEnumerable <ShowPieceActorAuditoriumTheatreDomainModel> shows;

            if (showQuery.Search == null)
            {
                shows = await _showService.GetAllShowsAsync();
            }
            else
            {
                shows = await _showService.GetAllShowsAsync(showQuery.Search);
            }

            if (shows == null)
            {
                shows = new List <ShowPieceActorAuditoriumTheatreDomainModel>();
            }

            return(Ok(shows));
        }