/// <inheritdoc /> public async Task UpdateAsync(long id, FoodUpdate food) { var entity = await _repo.GetAsync(id); _repo.Update(entity); _mapper.Map(food, entity); await _repo.SaveAsync(); }
public async Task <IActionResult> Update(long id, [FromBody] FoodUpdate food) { await _foodService.UpdateAsync(id, food); return(new NoContentResult()); }