public IActionResult Check() { ShoppingBasket basket = _context.GetBasket(User.Identity.Name); decimal sum = basket.Goods.GetTotal(); _context.AddOrder(basket, sum); Order order = _context.Orders .Where(x => x.Basket.Id == basket.Id).FirstOrDefault(); ViewBag.Sum = sum; ViewBag.Basket = basket; ViewBag.Order = order.Id; return(View()); }