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