//for update only public void UpdateInCountry(Countrydata objCountryData) { try { objCountryData.Validate(); CountryDB.UpdateCountry(objCountryData); } catch (Exception ex) { throw ex; } }
//for new insert only public void InsertInCountry(string countryName, long zipCodeStart, long zipCodeEnd, bool isActive) { try { Countrydata objCountry = new Countrydata(countryName, zipCodeStart, zipCodeEnd, isActive); objCountry.Validate(); CountryDB.InsertNewCountry(objCountry); } catch (Exception ex) { throw ex; } }