Beispiel #1
0
        public ActionResult DeleteMeal(int id)
        {
            var MealModelFromRepo = _repository.GetMealById(id);

            if (MealModelFromRepo == null)
            {
                return(NotFound());
            }
            _repository.DeleteMeal(MealModelFromRepo);
            _repository.SaveChanges();
            return(NoContent());
        }