public IHttpActionResult Post([FromBody] Drink drink) { try { if (DrinkService.AddDrink(drink) > 0) { return(Ok()); } else { return(NotFound()); } } catch (Exception) { return(NotFound()); } }
public void Post([FromBody] DrinkDTO value) { _service.AddDrink(value, User.Identity.Name); }