public IHttpActionResult Post([FromBody] Drink drink) { var d = DrinkService.Create(drink); if (d > 0) { return(Created("", drink)); } else { return(NotFound()); } }
public async Task <IActionResult> Create([FromBody] DrinkForListDto drink) { var result = await _drinkService.Create(drink); return(new OkObjectResult(ApiResponse.Create(result))); }