示例#1
0
 public ActionResult BuyConfirmed(ShoppingCart cart)
 {
     Customer customer = (Customer) TempData["customer"];
     Order order = new Order
     {
         Customer = customer,
         CustomerId = customer.Id,
         Date = DateTime.Now,
         OrderLines = cart.orderLines
     };
     _facade._orderRepository.Add(order);
     cart.CleanCart();
     return View("Confirmed");
 }
 public ActionResult BuyConfirmed(ShoppingCart cart)
 {
     Customer customer = (Customer) TempData["customer"];
     Order order = new Order
     {
         Customer = customer,
         CustomerId = customer.Id,
         Date = DateTime.Now,
         OrderLines = cart.orderLines
     };
     service.CreateOne(order);
     //_efService.Orders.Create(order);
     //_efService.Save();
     cart.CleanCart();
     return View("Confirmed");
 }