public ActionResult DeleteConfirmed(int id)
        {
            foods food = _foodManager.Find(x => x.id == id);

            _foodManager.Delete(food);
            return(RedirectToAction("Index"));
        }
示例#2
0
 public void DeleteFood(Food Food)
 {
     foodsManager.Delete(Food);
     foodsManager.Save();
 }