The fastest way to reset the database with EF Core
Posted on den 3 January 2022
In my opinion there are no better or more important tests than full database tests at controller level or similar. This kind of tests have great stability, are far more correct than if you do mocking and they are also more loosely coupled than mocked tests. The problem is that they can be slow though because unless you carefully designed your tests to not require an empty database from the beginning, you need to clear the database between each test and this is not easy to do quickly.
Corrupted model snapshot in EF Core and broken migrations
Posted on den 17 January 2021
EF Core migrations mostly just work. But in a team environment you might have come across cases when the migration you just created contain operations from earlier migrations. The case for this is almost always that the model snapshot was corrupted before. The most common reason for this is that remove migration
is actually not working that well and can often remove too much from the snapshot. I'll show how this happens and how you can fix / avoid it.
Migrating from EF6 to EF Core
Posted on den 1 June 2019
Do you also want to move to EF Core but are unsure if it's possible? Here is our story from migrating Bokio to EF Core.