public ActionResult <Drink> Delete(int id)
 {
     try
     {
         return(Ok(_service.Delete(id)));
     }
     catch (System.Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Esempio n. 2
0
 public ActionResult <string> BuyDrink(int id)
 {
     try
     {
         _ds.Delete(id);
         return(Ok("Bought"));
     }
     catch (System.Exception err)
     {
         return(BadRequest(err.Message));
     }
 }