diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs index 92ac4a8d8c3..adfb530ce25 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs @@ -491,6 +491,11 @@ protected virtual void ConfigureBaseProperties(ModelBuilder modelBuilde return; } + if (!typeof(IEntity).IsAssignableFrom(typeof(TEntity))) + { + return; + } + modelBuilder.Entity().ConfigureByConvention(); ConfigureGlobalFilters(modelBuilder, mutableEntityType);