Exemplo n.º 1
0
        public static void SetChildLoadOptions(DataLoadOptions loadOptions)
        {
            loadOptions.LoadWith <AddressPoint>(ap => ap.AddressPointStatus);
            loadOptions.LoadWith <AddressPoint>(ap => ap.GeographicPointLocation);

            AddressPointStatus.SetChildLoadOptions(loadOptions);
            GeographicPointLocation.SetChildLoadOptions(loadOptions);
        }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
 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);
 }