Browse Source

Update entity column aop

pull/31/head
sunkaixuan 2 years ago
parent
commit
e7eba6ecd3
  1. 5
      Src/Asp.Net/SqlSugar/Abstract/EntityMaintenance/EntityMaintenance.cs

5
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) 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 if (column.PropertyInfo.DeclaringType != null
&& column.PropertyInfo.DeclaringType != result.Type && column.PropertyInfo.DeclaringType != result.Type

Loading…
Cancel
Save