示例#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);
 }
示例#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;
        }