Exemple #1
0
        public static List <T> GetList(DataTable dt, List <EntityPropColumnAttributes> attributeList)
        {
            List <T> lst = new List <T>();

            if (dt == null)
            {
                return(lst);
            }
            if (dt.Rows.Count == 0)
            {
                return(lst);
            }
            DataTableEntityBuilder <T> eblist = CreateBuilder(dt.Rows[0]);

            foreach (DataRow dr in dt.Rows)
            {
                lst.Add(eblist.Build(dr));
            }
            dt.Dispose();
            dt = null;
            return(lst);
        }