public static void SetChildLoadOptions(DataLoadOptions loadOptions) { loadOptions.LoadWith <DenmarkAddress>(da => da.CountryRef); loadOptions.LoadWith <DenmarkAddress>(da => da.DanishAddress); loadOptions.LoadWith <DenmarkAddress>(da => da.GreenlandicAddress); DanishAddress.SetChildLoadOptions(loadOptions); }
public static DenmarkAddress FromXmlType(AdresseBaseType oio) { if (oio is DanskAdresseType) { return(DanishAddress.FromXmlType(oio as DanskAdresseType).DenmarkAddress); } else if (oio is GroenlandAdresseType) { return(GreenlandicAddress.FromXmlType(oio as GroenlandAdresseType).DenmarkAddress); } return(null); }
public static AdresseBaseType ToXmlType(DenmarkAddress db) { if (db.DanishAddress != null) { return(DanishAddress.ToXmlType(db.DanishAddress)); } else if (db.GreenlandicAddress != null) { return(GreenlandicAddress.ToXmlType(db.GreenlandicAddress)); } return(null); }
public static DanskAdresseType ToXmlType(DanishAddress db) { if (db != null && db.DenmarkAddress != null && db.DenmarkAddress.Address != null) { return(new DanskAdresseType() { AddressComplete = new AddressCompleteType() { AddressAccess = new AddressAccessType() { MunicipalityCode = db.DenmarkAddress.MunicipalityCode, StreetBuildingIdentifier = db.DenmarkAddress.StreetBuildingIdentifier, StreetCode = db.DenmarkAddress.StreetCode }, AddressPostal = new AddressPostalType() { CountryIdentificationCode = null, DistrictName = db.DenmarkAddress.DistrictName, DistrictSubdivisionIdentifier = db.DenmarkAddress.DistrictSubdivisionIdentifier, FloorIdentifier = db.DenmarkAddress.FloorIdentifier, MailDeliverySublocationIdentifier = db.DenmarkAddress.MailDeliverySublocation, PostCodeIdentifier = db.DenmarkAddress.PostCodeIdentifier, PostOfficeBoxIdentifier = db.PostOfficeBoxIdentifier, StreetBuildingIdentifier = db.DenmarkAddress.StreetBuildingIdentifier, StreetName = db.DenmarkAddress.StreetName, StreetNameForAddressingName = db.DenmarkAddress.StreetNameForAddressing } }, AddressPoint = AddressPoint.ToXmlType(db.AddressPoint), PolitiDistriktTekst = db.PoliceDistrict, PostDistriktTekst = db.PostDistrict, SkoleDistriktTekst = db.SchoolDistrict, SocialDistriktTekst = db.SocialDistrict, SogneDistriktTekst = db.ParishDistrict, SpecielVejkodeIndikator = db.DenmarkAddress.SpecialRoadCode.HasValue ? db.DenmarkAddress.SpecialRoadCode.Value : false, SpecielVejkodeIndikatorSpecified = db.DenmarkAddress.SpecialRoadCode.HasValue, ValgkredsDistriktTekst = db.ConstituencyDistrict, NoteTekst = db.DenmarkAddress.Address.Note, UkendtAdresseIndikator = db.DenmarkAddress.Address.IsUnknown, }); } return(null); }