/// <summary> /// Associate existing country to this customer /// </summary> /// <param name="country"></param> public void SetCountry(Country country) { if (country == null || country.IsTransient()) { throw new ArgumentException(Messages.exception_CannotAssociateTransientOrNullCountry); } //fix relation this.CountryId = country.Id; this.Country = country; }