diff --git a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs index 67aada2f9f7..5195c960457 100644 --- a/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs +++ b/src/EFCore.SqlServer/Scaffolding/Internal/SqlServerDatabaseModelFactory.cs @@ -648,7 +648,11 @@ private static string EscapeLiteral(string s) GetColumns(connection, tables, filter, viewFilter, typeAliases, databaseCollation); GetIndexes(connection, tables, filter); GetForeignKeys(connection, tables, filter); - GetTriggers(connection, tables, filter); + + if (SupportsTriggers()) + { + GetTriggers(connection, tables, filter); + } foreach (var table in tables) { @@ -1343,6 +1347,9 @@ private bool SupportsMemoryOptimizedTable() private bool SupportsSequences() => _compatibilityLevel >= 110 && _engineEdition != 6; + private bool SupportsTriggers() + => _engineEdition != 6; + private static string DisplayName(string? schema, string name) => (!string.IsNullOrEmpty(schema) ? schema + "." : "") + name;