internal FlightHistoryCore.Model.RouteDestination Convert() { DbModel.Destination origin = null; DbModel.Destination destination = null; DbModel.Estimate real = null; if (Origin != null) { origin = Origin.Convert(); } if (Destination != null) { destination = Destination.Convert(); } if (Real != null && Real is Estimated) { real = ((Estimated)Real).Convert(); } return(new DbModel.RouteDestination() { Origin = origin, Destination = destination, Real = real }); }