public ActionResult <Lego> Delete(int id)
 {
     try
     {
         return(Ok(_service.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
Exemple #2
0
 public ActionResult <Lego> Delete(int id)
 {
     try
     {
         string UserEmail = FindUserEmail();
         return(Ok(_service.Delete(id, UserEmail)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }