We're currently in a setup in which multiple systems use one huge database. In our newest system we're using Entity Framework Core with a code-first approach. Unfortunately, some changes of the database, made by the other systems, are not updated in the code-first system. As we don't have a complete integration-test coverage, these changes sometimes go unnotified until someone uses the changed entity by chance.
We can't just change the setup in a swift manner; therefore, we would like to have some automated sanity checks if the database and the models are synchronized. Searching for such a solution, I found this fine piece of code: Does an equivalent to Database.CompatibleWithModel(bool) exist in EF Core
But it is explicitly stated that this code should not be used (and it doesn't work anymore anyway). I found some more ideas from Brice here: Validate that EF Core ModelSnapshot, migrations, and actual database schema are consistent with each other. But these approaches are mostly manual ones respectively not easy to use from the code directly.
Is there already a solution around, which allows to check the synchronization between the mapping and the actual database from C# directly? Checking the Entity Framework Core interface, I think we would have all needed information available, but programming this checks in a generic manner seems like a huge task?