public ActionResult CheckOrder() { string email = TempData.Peek("User").ToString(); CCustomer customer = _storeRepo.GetOneCustomerByEmail(email); string storeLoc = TempData.Peek("storeLoc").ToString(); CStore store = _storeRepo.GetOneStore(storeLoc); // collection information about this customer var OrderHistory = _storeRepo.GetOneCustomerOrderHistory(customer, store); if (OrderHistory == null) { return(View(new List <OrderViewModel>())); } var viewOrder = ViewModelMapper.MapOrders(OrderHistory); return(View(viewOrder)); }