예제 #1
0
        public static bool DeleteCountries(string[] countryIds)
        {
            List <string>           ids      = new List <string>();
            IDatabaseSessionManager database = AbleContext.Current.Database;

            database.BeginTransaction();
            foreach (string cid in countryIds)
            {
                CountryDataSource.Delete(cid);
            }
            database.CommitTransaction();
            return(true);
        }
예제 #2
0
        public static bool DeleteAllCountries(string alphabet)
        {
            IList <Country>         countries = CountryDataSource.SearchByName(alphabet + "%");
            IDatabaseSessionManager database  = AbleContext.Current.Database;

            database.BeginTransaction();
            foreach (Country country in countries)
            {
                CountryDataSource.Delete(country);
            }
            database.CommitTransaction();
            return(true);
        }