Пример #1
0
        public static List <T> GetList <T>(this SqlDatabase db, string cmdText, List <SqlParameter> param = null) where T : new()
        {
            var dtTable = db.GetDataTable(cmdText, param);

            if (dtTable.Rows.Count == 0)
            {
                return(new List <T>());
            }
            return(dtTable.To <T>());
        }
Пример #2
0
 public static List <T> GetList <T>(this SqlDatabase db, string cmdText, List <SqlParameter> param = null) where T : new()
 {
     return(db.GetDataTable(cmdText, param).To <T>());
 }