Example #1
0
        public ActionResult <IEnumerable <TicketDto> > Get(string flightId, DateTime flightDate)
        {
            if (String.IsNullOrWhiteSpace(flightId))
            {
                return(NotFound("flightDate Is Null Or WhiteSpace!"));
            }
            if (flightDate == null)
            {
                return(NotFound("flightDate is null!"));
            }

            var tickets = _ticketSrvice.GetNotSoldSByFlightIdAndDate(flightId, flightDate);

            if (tickets == null || tickets.Count() == 0)
            {
                return(NotFound());
            }

            return(tickets.ToList());
        }