/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="t"></param> /// <param name="skip"></param> /// <param name="take"></param> /// <param name="selectSql"></param> /// <returns></returns> public static List <T> SkipTake <T>(this WhereHelperBase t, long skip, long take, string selectSql = null) { t.setCache(); var sql = getSelect <T>(t, selectSql); return(t._sqlhelper.SkipTake <T>(skip, take, t.GetFullSelectSql(sql), t._args.ToArray())); }
/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="t"></param> /// <param name="selectSql"></param> /// <returns></returns> public static T FirstOrDefault <T>(this WhereHelperBase t, string selectSql = null) { t.setCache(); var sql = getSelect <T>(t, selectSql); return(t._sqlhelper.FirstOrDefault <T>(t.GetFullSelectSql(sql), t._args.ToArray())); }
/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="t"></param> /// <param name="page"></param> /// <param name="itemsPerPage"></param> /// <param name="selectSql"></param> /// <returns></returns> public static Page <T> Page <T>(this WhereHelperBase t, long page, long itemsPerPage, string selectSql = null) { t.setCache(); var sql = getSelect <T>(t, selectSql); return(t._sqlhelper.Page <T>(page, itemsPerPage, t.GetFullSelectSql(sql), t._args.ToArray())); }
/// <summary> /// 执行返回DataSet /// </summary> /// <param name="t"></param> /// <param name="selectSql"></param> /// <returns></returns> public static DataSet ExecuteDataSet(this WhereHelperBase t, string selectSql = null) { t.setCache(); return(t._sqlhelper.ExecuteDataSet(t.GetFullSelectSql(selectSql), t._args.ToArray())); }