diff --git a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index b7da256b6..a609499db 100644 --- a/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.NetCore2/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1071,7 +1071,11 @@ namespace SqlSugar QueryBuilder.Take = num; return this; } - + public virtual ISugarQueryable Select(Expression expression) + { + Check.ExceptionEasy(this.QueryBuilder.Includes.HasValue(), $"use Includes(...).ToList(it=>new {typeof(TResult).Name} {{...}} )", $"Includes()后面禁使用Select,正确写法: ToList(it=>new {typeof(TResult).Name}{{....}})"); + return _Select(expression); + } public virtual ISugarQueryable Select(Expression> expression) { Check.ExceptionEasy(this.QueryBuilder.Includes.HasValue(), $"use Includes(...).ToList(it=>new {typeof(TResult).Name} {{...}} )", $"Includes()后面禁使用Select,正确写法: ToList(it=>new {typeof(TResult).Name}{{....}})"); diff --git a/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs b/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs index fe41f767c..97490ab62 100644 --- a/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs +++ b/Src/Asp.NetCore2/SqlSugar/Interface/IQueryable.cs @@ -128,7 +128,7 @@ namespace SqlSugar Task AnyAsync(Expression> expression); bool Any(); Task AnyAsync(); - + ISugarQueryable Select(Expression expression); ISugarQueryable Select(Expression> expression); ISugarQueryable Select(Expression> expression,bool isAutoFill); ISugarQueryable Select(); diff --git a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec index f45bcef20..d415f8dbe 100644 --- a/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec +++ b/Src/Asp.NetCore2/SqlSugar/SqlSugarForCore.nuspec @@ -2,7 +2,7 @@ SqlSugarCore - 5.1.3.58 + 5.1.4.59-preview02 sunkaixuan 果糖大数据科技 http://www.apache.org/licenses/LICENSE-2.0.html