public IActionResult CheckoutComplete(BasicData1 data1) { //data2.BasicData1Id = basicId; _orderRepository.InsertData1(data1); ViewBag.CheckoutCompleteMessage = "Thanks for your order! :) "; return(View()); }
public IActionResult BasicData2(BasicData1 data1) { basicId = data1.BasicData1Id; var items = _shoppingCart.GetShoppingCartItems(); if (items.Count == 0) { ModelState.AddModelError("", "Your cart is empty, add some items first"); return(RedirectToAction("Index", "Home")); } _orderRepository.InsertData1(data1); return(View()); }
public void InsertData1(BasicData1 data1) { _appDbContext.BasicDatas1.Add(data1); _appDbContext.SaveChanges(); }