From 6b7e01b14848a35318d2269c425291bc17d22923 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Wed, 13 Apr 2022 14:41:13 +0800 Subject: [PATCH] Add Check --- .../SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index b953df819..7d44e1c2d 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -2311,6 +2311,10 @@ namespace SqlSugar if (this.QueryBuilder.Includes != null) { var managers=(this.QueryBuilder.Includes as List); + if (this.QueryBuilder.SelectValue.HasValue()) + { + Check.ExceptionEasy("To use includes, use select after tolist()", "使用Includes请在ToList()之后在使用Select"); + } foreach (var it in managers) { var manager = it as NavigatManager;