public ActionResult ShoppingCar() { if (Session["Member"] == null) { return(RedirectToAction("Index")); } int MemberId = ((Members)Session["Member"]).Id; IQueryable <OrderDetails> oShoppingCarItems = _OrderDetailsOperation.ShoppingCarItems(MemberId); foreach (OrderDetails item in oShoppingCarItems) { Products oProducts = _ProudctOperation.ReadByProductID(item.PId); item.PName = oProducts.Name; item.PPrice = oProducts.Price; } if (oShoppingCarItems.Count() == 0) { return(RedirectToAction("Index")); } return(View("ShoppingCar", "LayoutMember", oShoppingCarItems)); }