public ActionResult CreateCart() { int StoreID = (int)HttpContext.Session.GetInt32("StoreID"); int UserID = (int)HttpContext.Session.GetInt32("UserID"); //Verify if it doesnt exist an pending Order, returns the OrderID created or existing: int OrderID = _buisnessLogicClass.CreateOrUpdatePendingOrder(UserID, StoreID); HttpContext.Session.SetInt32("OrderID", OrderID); //Get all the Inventory from the store. List <InventoryViewModel> inventories = _buisnessLogicClass.GetAllTheInventoryFromStore(StoreID); return(View(inventories)); }