コード例 #1
0
        public Ingredient Delete(int id)
        {
            Ingredient exists = Get(id);

            _repo.Delete(id);
            return(exists);
        }
コード例 #2
0
 public void Delete(int id)
 {
     using (var ingredient = new IngredientsRepository())
     {
         TreatmentIngredients treat = ingredient.GetById(id);
         if (treat != null)
         {
             ingredient.Delete(treat);
         }
     }
 }
コード例 #3
0
        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");
        }
コード例 #4
0
 public ActionResult DeleteIngredient(int id)
 {
     iRepo.Delete(id);
     return(RedirectToAction("Ingredients"));
 }
コード例 #5
0
 internal string Delete(int id)
 {
     GetById(id);
     _repo.Delete(id);
     return("Deleted");
 }
コード例 #6
0
 internal string Delete(int id)
 {
     _repo.Delete(id);
     return("deleted");
 }