public IActionResult CreateOrder() { var user = servicesUser.GetUser(); var ids = servicesCart.GetCartItems(); var shopItems = shopCartRep.GetShopCartItems(ids); if (!orderRep.CheckProductsInStock(shopItems)) { return(RedirectToAction("Index", "ShopCart", new { message = "К сожалению на складе нет товаров в таком количестве" })); } var orderWithCustomer = new OrderWithCustomerViewModel(); orderWithCustomer.User = user; return(View(orderWithCustomer)); }