.NET 7 Entity Framework Upgrade

We have just upgraded a project from .NET 6 to .NET 7 and updated the package dependencies to Entity Framework Core.

If you do this you might get this Certificate Chain error:

This is because the latest Entity Framework Core requires the server certificate to be trusted. Add the following to your SQL Server connection string:

Trust Server Certificate=true;