예제 #1
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         _storage.Delete(id);
         return(NoContent());
     }
     catch (KeyNotFoundException)
     {
         return(NotFound());
     }
 }
예제 #2
0
 public IActionResult Delete(Guid id)
 {
     try
     {
         _storage.Delete(id);
         return(NoContent());
     }
     catch (ArgumentNullException)
     {
         return(BadRequest());
     }
     catch (ArgumentException)
     {
         return(NotFound());
     }
 }