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); }
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; }