public async Task <IActionResult> UpdateAsync([FromBody] FoodManage dto) { try { await foodService.CreateAsync(dto); return(Ok()); } catch (EntityNotFoundException <Food> ) { return(NoContent()); } catch (Exception) { return(BadRequest()); } }
public async Task <IActionResult> Create([FromBody] FoodCreate food) { await _foodService.CreateAsync(food); return(new NoContentResult()); }