Entity Framework Articles

Technology experience and practical advice from Mitchel Sellers on Entity Framework.

Browse Articles

8 articles

EF Core Reporting Views: Design the Row Before Writing the Query

Development > Entity Framework

Posted:

EntityFramework Core can write incredibly complex queries for you, with great ease, most of the time. However, for complex situations, it may be necessary to create views to help ensure that you get the right data, in the right structure, and at the right time. Let's dive into this process and how to approach the situation with a structured process that is repeatable.

Arbitrary SQL, Migrations & Idempotent Scripting

Development > Entity Framework

Posted:

I'm a huge fan of Entity Framework Migrations, using them for almost all client projects. In a given week, I will see dozens of changes deploy to production successfully across our portfolio of projects. However, there is always that "one task" that results in a failure and each time it happens it triggers an update to our internal training and review processes, and it has to do with repeatable scripting and the use of the "idempotent" flag. I thought I'd share our experiences with everyone, to help prevent issues for others.

Squashing EF Core Migrations Safely

Development > Entity Framework

Posted:

Projects can evolve over time, and the history of granular migrations within Entity Framework can result in a bloated change history. Additionally, changes can occur within Entity Framework tooling that may result in code warnings or other similar concerns. Resetting your migrations to squash the history can be a very helpful process, however it requires precision and care.