public bool CountryRegionCurrencyDelete(CountryRegionCurrency countryregioncurrency)
        {
            return Execute<bool>(dal =>
            {
                CountryRegionCurrency countryregioncurrencyDelete = dal.CountryRegionCurrency.Where(x => x.CountryRegionCode == countryregioncurrency.CountryRegionCode).FirstOrDefault();
                if (countryregioncurrencyDelete != null)
                {
                    dal.CountryRegionCurrency.DeleteOnSubmit(countryregioncurrencyDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
        public bool CountryRegionCurrencyUpdate(CountryRegionCurrency countryregioncurrency)
        {
            return Execute<bool>(dal =>
               {
               CountryRegionCurrency countryregioncurrencyUpdate = dal.CountryRegionCurrency.Where(x => x.CountryRegionCode == countryregioncurrency.CountryRegionCode).FirstOrDefault();
               if (countryregioncurrencyUpdate != null)
               {
                   countryregioncurrencyUpdate.CountryRegionCode = countryregioncurrency.CountryRegionCode;
                   countryregioncurrencyUpdate.CurrencyCode = countryregioncurrency.CurrencyCode;
                   countryregioncurrencyUpdate.ModifiedDate = countryregioncurrency.ModifiedDate;

                   dal.SubmitChanges();
                   return true;
               }
               return false;

               });
        }
 partial void DeleteCountryRegionCurrency(CountryRegionCurrency instance);
 partial void UpdateCountryRegionCurrency(CountryRegionCurrency instance);
 partial void InsertCountryRegionCurrency(CountryRegionCurrency instance);
		private void detach_CountryRegionCurrencies(CountryRegionCurrency entity)
		{
			this.SendPropertyChanging();
			entity.Currency = null;
		}
		private void attach_CountryRegionCurrencies(CountryRegionCurrency entity)
		{
			this.SendPropertyChanging();
			entity.CountryRegion = this;
		}
 public void CountryRegionCurrencyUpdate(CountryRegionCurrency countryregioncurrency)
 {
     adventureWorks_BC.CountryRegionCurrencyUpdate(countryregioncurrency);
 }