Esempio n. 1
0
        public List <Brand> AllBrand()
        {
            List <Brand> list_brand = new List <Brand>();
            var          listBrand  = _connectDB.AllBrand();

            foreach (DataRow dr in listBrand.Tables[0].Rows)
            {
                Brand brand = new Brand();
                brand.id   = Convert.ToInt32(dr["id"]);
                brand.name = dr["name"].ToString();
                list_brand.Add(brand);
            }
            return(list_brand);
        }