public JsonResult DeleteOrder(int id) { using (OrdersData db = new OrdersData()) { return(Json(db.Delete(_order => _order.Id == id))); } }
public ActionResult Delete(Orders orders) { if (_orders.Delete(orders) > 0) { return(RedirectToAction("Index")); } return(View(orders)); }