public static AddressCity CreateAddressCity(string cityKey, global::Microsoft.Dynamics.DataEntities.AddressState state, global::Microsoft.Dynamics.DataEntities.AddressCountryRegion countryRegion) { AddressCity addressCity = new AddressCity(); addressCity.CityKey = cityKey; if ((state == null)) { throw new global::System.ArgumentNullException("state"); } addressCity.State = state; if ((countryRegion == null)) { throw new global::System.ArgumentNullException("countryRegion"); } addressCity.CountryRegion = countryRegion; return(addressCity); }
partial void OnAddressStateChanging(global::Microsoft.Dynamics.DataEntities.AddressState value);
public static AddressCounty CreateAddressCounty(string countryRegionId, string stateId, string countyId, global::Microsoft.Dynamics.DataEntities.AddressState addressState) { AddressCounty addressCounty = new AddressCounty(); addressCounty.CountryRegionId = countryRegionId; addressCounty.StateId = stateId; addressCounty.CountyId = countyId; if ((addressState == null)) { throw new global::System.ArgumentNullException("addressState"); } addressCounty.AddressState = addressState; return(addressCounty); }