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