public static EntityAddress ReadFromDTO(EntityAddress target, EntityAddressDTO source)
 {
     AddressTX.ReadFromDTO(target.Address, source.Address);
     AddressTypeTX.ReadFromDTO(target.AddressType, source.AddressType);
     EntityTX.ReadFromDTO(target.Entity, source.Entity);
     target.AddressId     = source.AddressId;
     target.EntityId      = source.EntityId;
     target.AddressTypeId = source.AddressTypeId;
     target.ModifiedDate  = source.ModifiedDate;
     return(target);
 }
 public static EntityContact ReadFromDTO(EntityContact target, EntityContactDTO source)
 {
     ContactDetailTX.ReadFromDTO(target.ContactDetail, source.ContactDetail);
     ContactTypeTX.ReadFromDTO(target.ContactType, source.ContactType);
     EntityTX.ReadFromDTO(target.Entity, source.Entity);
     target.ContactId     = source.ContactId;
     target.EntityId      = source.EntityId;
     target.ContactTypeId = source.ContactTypeId;
     target.ModifiedDate  = source.ModifiedDate;
     return(target);
 }
 public static EntityAddressDTO WriteToDTO(EntityAddress source)
 {
     return(new EntityAddressDTO
     {
         Address = AddressTX.WriteToDTO(source.Address),
         AddressType = AddressTypeTX.WriteToDTO(source.AddressType),
         Entity = EntityTX.WriteToDTO(source.Entity),
         AddressId = source.AddressId,
         EntityId = source.EntityId,
         AddressTypeId = source.AddressTypeId,
         ModifiedDate = source.ModifiedDate,
     });
 }
 public static EntityContactDTO WriteToDTO(EntityContact source)
 {
     return(new EntityContactDTO
     {
         ContactDetail = ContactDetailTX.WriteToDTO(source.ContactDetail),
         ContactType = ContactTypeTX.WriteToDTO(source.ContactType),
         Entity = EntityTX.WriteToDTO(source.Entity),
         ContactId = source.ContactId,
         EntityId = source.EntityId,
         ContactTypeId = source.ContactTypeId,
         ModifiedDate = source.ModifiedDate,
     });
 }