// GET: Booking public ActionResult Index() { int?userId = (int?)Session[Global.UserIdSessionVar]; if (userId != null) { IEnumerable <Booking> res = _bookingFacade.FindByCustomerId((int)userId); return(View(res.Select(b => CreateBookingVMFromDto(b)))); } return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); }
private async Task GetValues() { bookings = await _bookingFacade.FindByCustomerId(GenericFacade.UserId); }