Ejemplo n.º 1
0
        public ActionResult Delete(Guid id)
        {
            var mr       = new MealRepository();
            var model    = mr.GetAll(UserController.currentUser.Id);
            var toDelete = model.Where(x => id.Equals(x.Id)).FirstOrDefault();

            mr.DeleteMeal(toDelete);
            return(RedirectToAction("Meals"));
        }