public Data.Models.Flight GetFlight(FlightNew flight) { var entityFlight = new Data.Models.Flight { Reference = flight.Reference, DepartureAirportCode = flight.DepartureAirportCode, DepartureTime = flight.DepartureTime, ArrivalAirportCode = flight.ArrivalAirportCode, ArrivalTime = flight.ArrivalTime }; return(entityFlight); }
public Flight GetFlight(Data.Models.Flight flight, double distanceMetres, double estimatedFuelConsumptionLitres) { var webModelFlight = new Flight { Reference = flight.Reference, DepartureAirportCode = flight.DepartureAirportCode, DepartureTime = flight.DepartureTime, ArrivalAirportCode = flight.ArrivalAirportCode, ArrivalTime = flight.ArrivalTime, DistanceMetres = distanceMetres, EstimatedFuelConsumptionLitres = estimatedFuelConsumptionLitres }; return(webModelFlight); }