From 408a9d57861e60d718d9d4ecdc0176f994f77e06 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Fri, 7 Jul 2023 12:00:47 +0800 Subject: [PATCH] Synchronization code --- .../QueryableProvider/QueryableExecuteSql.cs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableExecuteSql.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableExecuteSql.cs index 47f5b4727..4699d4699 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableExecuteSql.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableExecuteSql.cs @@ -98,17 +98,17 @@ namespace SqlSugar public virtual List ToList(Expression> expression) { - if (this.QueryBuilder.Includes != null && this.QueryBuilder.Includes.Count > 0) - { - return NavSelectHelper.GetList(expression, this); - // var list = this.ToList().Select(expression.Compile()).ToList(); - // return list; - } - else - { + //if (this.QueryBuilder.Includes != null && this.QueryBuilder.Includes.Count > 0) + //{ + // return NavSelectHelper.GetList(expression, this); + // // var list = this.ToList().Select(expression.Compile()).ToList(); + // // return list; + //} + //else + //{ var list = this.Select(expression).ToList(); return list; - } + //} } public virtual int Count() @@ -668,21 +668,21 @@ namespace SqlSugar } public virtual List ToPageList(int pageIndex, int pageSize, ref int totalNumber, Expression> expression) { - if (this.QueryBuilder.Includes != null && this.QueryBuilder.Includes.Count > 0) - { - if (pageIndex == 0) - pageIndex = 1; - var list = this.Clone().Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(expression); - var countQueryable = this.Clone(); - countQueryable.QueryBuilder.Includes = null; - totalNumber = countQueryable.Count(); - return list; - } - else - { + //if (this.QueryBuilder.Includes != null && this.QueryBuilder.Includes.Count > 0) + //{ + // if (pageIndex == 0) + // pageIndex = 1; + // var list = this.Clone().Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(expression); + // var countQueryable = this.Clone(); + // countQueryable.QueryBuilder.Includes = null; + // totalNumber = countQueryable.Count(); + // return list; + //} + //else + //{ var list = this.Select(expression).ToPageList(pageIndex, pageSize, ref totalNumber).ToList(); return list; - } + //} } public virtual List ToPageList(int pageIndex, int pageSize, ref int totalNumber) {