public ActionResult LocationOrderHistory() { var claimsIdentity = (ClaimsIdentity)User.Identity; if (claimsIdentity == null) { return(RedirectToAction("Index", "Home")); } var user = _logicClass.GetCurrentUser(claimsIdentity); //var ivmList = _logicClass.CreateInvoiceList(user); //var oivmList = _logicClass.CreateOrderInvoiceList(user); //decimal total = oivmList.Sum(x => x.LineTotal); //var order = _logicClass.GetOrderById(oivmList.FirstOrDefault(x => x.Id != null).OrderId); var orders = _logicClass.GetLocationOrderHistory(user); //ViewBag.OrderDate = order.OrderTime; //ViewBag.OrderTotal = total; return(View("LocationOrderHistoryView", orders)); }