I'm in the process of migrating old .NET Framework & EF 6 Web API to .NET 8 and EF Core 8.
Yesterday because of this breaking change, I changed compatibility_level
to 130
for our Azure SQL databases: https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes#contains-in-linq-queries-may-stop-working-on-older-sql-server-versions
My question is: what is the recommended compatibility_level
for EF6 and for EF Core 8?
We want to have the same database working for both EF6 and EF Core 8 because of migration testing.
EDIT after resolving: this is remarks for Azure SQL in Microsoft's documentation: https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver16&redirectedfrom=MSDN#remarks-for-azure-sql
As posted by EFCore Team member, it is safe to use latest compatibility level for Azure SQL: https://github.com/dotnet/efcore/issues/33980#issuecomment-2165072564
I updated to 160
- no issues on both EF6 and EF8 WebAPIs yet.