Exemplo n.º 1
0
        public bool CountryRegionDelete(CountryRegion countryregion)
        {
            return Execute<bool>(dal =>
            {
                CountryRegion countryregionDelete = dal.CountryRegion.Where(x => x.CountryRegionCode == countryregion.CountryRegionCode).FirstOrDefault();
                if (countryregionDelete != null)
                {
                    dal.CountryRegion.DeleteOnSubmit(countryregionDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
Exemplo n.º 2
0
        public bool CountryRegionUpdate(CountryRegion countryregion)
        {
            return Execute<bool>(dal =>
            {
                CountryRegion countryregionUpdate = dal.CountryRegion.Where(x => x.CountryRegionCode == countryregion.CountryRegionCode).FirstOrDefault();
                if (countryregionUpdate != null)
                {
                    countryregionUpdate.CountryRegionCode = countryregion.CountryRegionCode;
                    countryregionUpdate.Name = countryregion.Name;
                    countryregionUpdate.ModifiedDate = countryregion.ModifiedDate;

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

            });
        }
 partial void DeleteCountryRegion(CountryRegion instance);
 partial void UpdateCountryRegion(CountryRegion instance);
 partial void InsertCountryRegion(CountryRegion instance);
Exemplo n.º 6
0
 public void CountryRegionUpdate(CountryRegion countryregion)
 {
     adventureWorks_BC.CountryRegionUpdate(countryregion);
 }
Exemplo n.º 7
0
 public void CountryRegionAdd(CountryRegion countryregion)
 {
     adventureWorks_BC.CountryRegionAdd(countryregion);
 }