Exemplo n.º 1
0
 public static bool IsChangedFrom(this ImportedLocation importedLocation, Location persistedLocation)
 {
     return(persistedLocation == null ||
            persistedLocation.StreetAddress == importedLocation.Address ||
            persistedLocation.City == importedLocation.City ||
            persistedLocation.State == importedLocation.State ||
            persistedLocation.Zip == importedLocation.Zip);
 }
Exemplo n.º 2
0
        public static void MapTo(this ImportedLocation importedLocation, Location persistedLocation)
        {
            if (persistedLocation == null)
            {
                persistedLocation = new Location();
            }

            persistedLocation.StreetAddress = importedLocation.Address;
            persistedLocation.City          = importedLocation.City;
            persistedLocation.State         = importedLocation.State;
            persistedLocation.Zip           = importedLocation.Zip;
        }