public ActionResult DeleteConfirmed(int id) { foods food = _foodManager.Find(x => x.id == id); _foodManager.Delete(food); return(RedirectToAction("Index")); }
public void DeleteFood(Food Food) { foodsManager.Delete(Food); foodsManager.Save(); }