コード例 #1
0
 public IActionResult DeleteFlight(string id)
 {
     if (_flightsManager.DeleteFlightPlan(id))
     {
         return(Ok());
     }
     return(BadRequest(new Error("Could not delete flight.")));
 }
コード例 #2
0
 public ActionResult DeleteFlight(string id)
 {
     if (myFlightsManager.DeleteFlightPlan(id))
     {
         return(Ok());
     }
     // if the flight was not found
     return(NotFound("Flight wasn't found"));
 }