Exemplo n.º 1
0
        /// <summary>
        /// 获取多条数据排序
        /// </summary>
        /// <typeparam name="T">对象</typeparam>
        /// <typeparam name="TRuslt">对象</typeparam>
        /// <param name="Source">List</param>
        /// <param name="Exp">查询条件</param>
        /// <param name="OrderBy">排序</param>
        /// <param name="SType">排序类型</param>
        /// <returns></returns>
        public static List <T> GDList <T, TRuslt>(this T Source, Expression <Func <T, bool> > Exp, Expression <Func <T, TRuslt> > OrderBy, SQLEnum.SortType SType) where T : new()
        {
            MySQLBSHelper Bs = new MySQLBSHelper(ConnectName);

            return(Bs.GDList(Source, Exp, OrderBy, SType));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取多条数据无排序,默认排序为主键倒序
        /// </summary>
        /// <typeparam name="T">对象</typeparam>
        /// <param name="Source">对象</param>
        /// <returns></returns>
        public static List <T> GDList <T>(this T Source, Expression <Func <T, bool> > Exp) where T : new()
        {
            MySQLBSHelper Bs = new MySQLBSHelper(ConnectName);

            return(Bs.GDList(Source, Exp));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 获取多条数据排序,默认排序为倒序
        /// </summary>
        /// <typeparam name="T">对象</typeparam>
        /// <typeparam name="TRuslt">对象</typeparam>
        /// <param name="Source">List</param>
        /// <param name="OrderBy">排序字段</param>
        /// <returns></returns>
        public static List <T> GDList <T, TRuslt>(this IEnumerable <T> Source, Expression <Func <T, TRuslt> > OrderBy) where T : new()
        {
            MySQLBSHelper Bs = new MySQLBSHelper(ConnectName);

            return(Bs.GDList(Source, OrderBy));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 获取多条数据无排序,默认排序为主键倒序
        /// </summary>
        /// <typeparam name="T">对象</typeparam>
        /// <param name="Source">对象</param>
        /// <returns></returns>
        public static List <T> GDList <T>(this IEnumerable <T> Source) where T : new()
        {
            MySQLBSHelper Bs = new MySQLBSHelper(ConnectName);

            return(Bs.GDList(Source));
        }