Exemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            #region EF6 Code
            //Order order = db.OrderSet.Find(id);
            //db.OrderSet.Remove(order);
            //db.SaveChanges();
            //return RedirectToAction("Index");
            #endregion

            Order order = _repo.GetOrderById(id);
            _repo.DeleteOrder(id);
            return(RedirectToAction("Edit", "Customers", new { id = order.CustomerId }));
        }