public async Task <IActionResult> UpdateMeal(int mealId, Meal meal) { if (meal == null || meal.MealId != mealId) { return(BadRequest()); } var tmpmeal = MealRepository.Get(mealId); if (tmpmeal == null) { return(NotFound()); } await MealRepository.UpdateMeal(meal); return(Accepted()); }
public async Task <MealDto> Get(int id) { return(await _mealRepository.Get(id)); }
public List <Meal> GetMeals() { return(_mealRepository.Get()); }