Пример #1
0
 public IHttpActionResult DeleteProduct(int id)
 {
     try
     {
         return(Ok(repository.delete(id)));
     }
     catch (Exception e)
     {
         return(NotFound());
     }
 }
Пример #2
0
 public IHttpActionResult DeleteAuthor(int id)
 {
     try
     {
         return(Ok(authorRepository.delete(id)));
     }
     catch (Exception e)
     {
         return(NotFound());
     }
 }