Métodos usados con frecuencia
Métodos usados con frecuencia
Métodos usados con frecuencia
Métodos usados con frecuencia
public Task AddFlight([FromBody] Flight flight, string flightType, string travelIdentity) { if (flightType == "to") { return(_travelService.AddToFlight(flight, travelIdentity)); } if (flightType == "from") { return(_travelService.AddFromFlight(flight, travelIdentity)); } throw new TravelPlannerException(400, "Bad flight type: choose either 'to' or 'from'"); }