public Ingredient Delete(int id) { Ingredient exists = Get(id); _repo.Delete(id); return(exists); }
public void Delete(int id) { using (var ingredient = new IngredientsRepository()) { TreatmentIngredients treat = ingredient.GetById(id); if (treat != null) { ingredient.Delete(treat); } } }
internal object Delete(int id) { Ingredient foundIngredient = GetById(id); if (_repo.Delete(id)) { return("Very good, Great Success, the Ingredient is she gone!"); } throw new Exception ("that did nut work, that Ingredient is not alive"); }
public ActionResult DeleteIngredient(int id) { iRepo.Delete(id); return(RedirectToAction("Ingredients")); }
internal string Delete(int id) { GetById(id); _repo.Delete(id); return("Deleted"); }
internal string Delete(int id) { _repo.Delete(id); return("deleted"); }