Start Debugging

Daily notes on .NET, C#, EF Core, MAUI, Blazor, and Flutter - for developers who ship.

How to warm up EF Core's model before the first query
EF Core builds its conceptual model lazily on the first DbContext access, which is why the first query in a fresh process is several hundred milliseconds slower than every query after it. This guide covers the three real fixes in EF Core 11: a startup IHostedService that touches Model and opens a connection, dotnet ef dbcontext optimize to ship a precompiled model, and the cache-key footguns that silently rebuild the model anyway.
Page 1 of 27 Next ›