public static void SetChildLoadOptions(DataLoadOptions loadOptions) { loadOptions.LoadWith <AddressPoint>(ap => ap.AddressPointStatus); loadOptions.LoadWith <AddressPoint>(ap => ap.GeographicPointLocation); AddressPointStatus.SetChildLoadOptions(loadOptions); GeographicPointLocation.SetChildLoadOptions(loadOptions); }
public static AddressPointType ToXmlType(AddressPoint db) { if (db != null) { return(new AddressPointType() { AddressPointIdentifier = db.Identifier, AddressPointStatusStructure = AddressPointStatus.ToXmlType(db.AddressPointStatus), GeographicPointLocation = GeographicPointLocation.ToXmlType(db.GeographicPointLocation) }); } return(null); }
public static AddressPoint FromXmlType(AddressPointType oio) { if (oio != null) { return(new AddressPoint { AddressPointStatus = AddressPointStatus.FromXmlType(oio.AddressPointStatusStructure), GeographicPointLocation = GeographicPointLocation.FromXmlType(oio.GeographicPointLocation), Identifier = oio.AddressPointIdentifier, }); } return(null); }
public static AddressPointStatusStructureType ToXmlType(AddressPointStatus db) { if (db != null) { new AddressPointStatusStructureType() { AddressCoordinateQualityClassCode = db.AddressCoordinateQualityTypeCode.HasValue ? (AddressCoordinateQualityClassCodeType)Enum.Parse(typeof(AddressCoordinateQualityClassCodeType), db.AddressCoordinateQualityTypeCode.Value.ToString()) : AddressCoordinateQualityClassCodeType.A, AddressCoordinateQualityClassCodeSpecified = db.AddressCoordinateQualityTypeCode.HasValue, AddressPointRevisionDateTime = db.RevisionDate, AddressPointValidEndDateTime = db.ValidEndDate.HasValue ? db.ValidEndDate.Value : new DateTime(), AddressPointValidEndDateTimeSpecified = db.ValidEndDate.HasValue, AddressPointValidStartDateTime = db.ValidStartDate.HasValue ? db.ValidStartDate.Value : new DateTime(), AddressPointValidStartDateTimeSpecified = db.ValidStartDate.HasValue, }; } return(null); }