Exemple #1
0
        public void ImportBrandList()
        {
            IList <ELongBrandAdapter> brands = ELongStaticClient.GetBrandList();

            this.OpenSession();
            ITransaction tx = this.session.BeginTransaction();

            foreach (ELongBrandAdapter brand in brands)
            {
                BrandModel temp = new BrandModel();
                temp.from(brand);
                //System.Console.WriteLine(string.Format("{0}:{1}:{2}:{3}", temp.brandID, temp.brandNameLong, temp.groupID, temp.lastChangetime.ToString()));
                this.session.SaveOrUpdate(temp);
            }
            tx.Commit();
        }