예제 #1
0
 public IActionResult CheckoutComplete(BasicData1 data1)
 {
     //data2.BasicData1Id = basicId;
     _orderRepository.InsertData1(data1);
     ViewBag.CheckoutCompleteMessage = "Thanks for your order! :) ";
     return(View());
 }
예제 #2
0
        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());
        }
예제 #3
0
 public void InsertData1(BasicData1 data1)
 {
     _appDbContext.BasicDatas1.Add(data1);
     _appDbContext.SaveChanges();
 }