常用方法
常用方法
常用方法
常用方法
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 })); }