コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }