You can ignore properties on the type configuration level, so you need start from modelBuilder.Types()
and not from modelBuilder.Properties()
:
modelBuilder.Types().Configure(typeConfiguration =>
{
foreach (var property in typeConfiguration.ClrType
.GetProperties().Where(p => p.PropertyType.IsEnum))
{
typeConfiguration.Ignore(property);
}
});