public IActionResult Delete(int id) { FoodOrder foodOrder = dbFoodOrder.GetEntity(id); if (foodOrder == null) { return(NotFound()); } dbFoodOrder.Delete(id); dbFoodOrder.Save(); return(Ok(foodOrder)); }
public ActionResult Delete(int id) { frepo.Delete(id); return(Json(1, JsonRequestBehavior.AllowGet)); }