// GET: BookingRequest public ActionResult Index() { var bookingRequests = _bookingRequestRepo.FindAll(); var bookingRequestsModel = _mapper.Map <List <BookingRequestViewModel> >(bookingRequests); var model = new AdminBookingRequestViewModel { TotalRequests = bookingRequestsModel.Count, ApprovedRequests = bookingRequestsModel.Count(q => q.Approved == true), PendingRequests = bookingRequestsModel.Count(q => q.Approved == null), RejectedRequests = bookingRequestsModel.Count(q => q.Approved == false), BookingRequests = bookingRequestsModel }; return(View(model)); }
public async Task <List <BookingRequest> > GetBookings(Guid clientId) { return(await bookings.FindAll(clientId)); }