Exemple #1
0
 public async Task <IHttpActionResult> Delete(int id)
 {
     try
     {
         await Repository.DeleteAsync(id);
     }
     catch (InvalidOperationException)
     {
         throw new HttpResponseException(HttpStatusCode.NotFound);
     }
     return(Ok());
 }