public async Task <ActionResult> GetPendingReservations() { var response = new HttpCollection <GetReservationItemResponse>(); var data = await Context.Reservations.Where(r => r.Status == ReservationStatus.Pending).ToListAsync(); response.Data = data.Select(r => MapIt(r)).ToList(); return(Ok(response)); }
public async Task <ActionResult> GetAllReservations() { var response = new HttpCollection <GetReservationItemResponse>(); var data = await Context.Reservations.ToListAsync(); response.Data = data.Select(r => MapIt(r)).ToList(); return(Ok(response)); }