From e7eba6ecd3f4f945e0eca4b71319677bdea076b6 Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sun, 22 Jan 2023 15:18:15 +0800 Subject: [PATCH] Update entity column aop --- .../SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs index f391581e5..7d9f515f6 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs @@ -335,7 +335,10 @@ namespace SqlSugar } if (this.Context.CurrentConnectionConfig.ConfigureExternalServices != null && this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService != null) { - this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService(property, column); + if (column.EntityName != null && !column.EntityName.StartsWith("<>f__AnonymousType")) + { + this.Context.CurrentConnectionConfig.ConfigureExternalServices.EntityService(property, column); + } } if (column.PropertyInfo.DeclaringType != null && column.PropertyInfo.DeclaringType != result.Type