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