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); }
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)); }