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