Esempio n. 1
0
 public IActionResult GetTickets(int userId)
 {
     _log4net.Info(" Http GetTicket request Initiated with id {0}" + userId);
     if (userId == 0)
     {
         return(BadRequest("Provide Valid User Id"));
     }
     try
     {
         var tickets = repo.GetBookings(userId);
         if (tickets != null)
         {
             return(Ok(tickets));
         }
         return(BadRequest("No Booking yet"));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
Esempio n. 2
0
 public IEnumerable <Bookings> GetBookings()
 {
     return(_bookingrepo.GetBookings());
 }
 public IEnumerable <BookingDetailsDto> GetBookings(int id, int pageNumber = 0, int pageSize = 10, string searchText = "")
 {
     return(_bookingRepo.GetBookings(id, pageNumber, pageSize, searchText));
 }
Esempio n. 4
0
        public IHttpActionResult GetBookings()
        {
            var data = booking.GetBookings();

            return(Ok(data));
        }
Esempio n. 5
0
 public IEnumerable <Booking> GetGetBookings()
 {
     _log4net.Info("get Booking is initialized");
     return(_context.GetBookings());
 }