Exemplo n.º 1
0
        /// <summary>
        /// 返回动态对象
        /// 会按GROUP和分页判断
        /// </summary>
        /// <returns></returns>
        public List <dynamic> ToDynamic()
        {
            var db = new DBExtend(__DbContext);

            if (__PageSize > 0)
            {
                return(db.Page(this));
            }
            return(db.QueryDynamic(this));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 返回当前类型
        /// 会按GROUP和分页判断
        /// </summary>
        /// <returns></returns>
        public List <T> ToList()
        {
            var db = new DBExtend(__DbContext);

            //如果是筛选后的结果,属性可能匹配不上
            if (__PageSize > 0)
            {
                return(db.Page <T, T>(this));
            }
            return(db.QueryList(this));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 返回指定类型
        /// 会按GROUP和分页判断
        /// </summary>
        /// <typeparam name="TResult"></typeparam>
        /// <returns></returns>
        public List <TResult> ToList <TResult>()
            where TResult : class, new()
        {
            var db = new DBExtend(__DbContext);

            if (__PageSize > 0)
            {
                return(db.Page <T, TResult>(this));
            }
            return(db.QueryDynamic <T, TResult>(this));
        }