Ejemplo n.º 1
0
        public T FirstDefault <T>(string where)
        {
            T         t     = default(T);
            DataTable dt    = ToTable <T>(where);
            List <T>  tlist = DbComm.DataToClass <T>(dt);

            if (tlist.Count > 0)
            {
                t = tlist[0];
            }
            return(t);
        }
Ejemplo n.º 2
0
        public List <T> ToList <T>(int page, int count, string where, string column, bool orderby)
        {
            DataTable dt = ToTable <T>(page, count, where, column, orderby);

            return(DbComm.DataToClass <T>(dt));
        }