From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon
From the archives...
Past Is Not Prologue - #ScifiDevCon2025
https://barretblake.dev/posts/development/2025/05/past-is-not-prologue-scifidevcon2025/ #youtube #EntityFramework #SciFiDevCon
From the .NET blog...
In case you missed it earlier...
.NET 11 Preview 3 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-3/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured
From the .NET blog...
.NET 11 Preview 3 is now available!
https://devblogs.microsoft.com/dotnet/dotnet-11-preview-3/ #dotnet #NETMAUI #ASPNETCore #csharp #EntityFramework #NET11 #Featured
How to Delete and Update Millions of Rows in EF Core Without Loading a Single Entity | by Chris Woodruff
#dotnet #entityframework #efcore #csharp #data #database #orm

The Code Every Developer Has Written and Regretted Most EF Core performance disasters are not exotic edge cases. They get written in the first sprint, look clean in code review, and only reveal themselves when row counts hit production scale. The pattern below has ended more than a few on-call rotations badly: // Looks fine.
New post from my blog...
In case you missed it earlier...
EF Core Migrations Best Practices
https://barretblake.dev/posts/development/2026/04/ef-migrations-best-practices/ #entityframework
New post from my blog...
EF Core Migrations Best Practices
https://barretblake.dev/posts/development/2026/04/ef-migrations-best-practices/ #entityframework
#databases #sqlserver #technicalDebt #entityFramework
So... At work, our product has many data grids, and uses Entity Framework, most of the grids are paged.
Paging is done via await orderedQuery. Skip((page-1)*pageSize). Take(pageSize).TolistAsync()
Page 2 loads had always been slow. EF "optimises" the generated query to use one parameter for the second page because page 2 is ... .Skip((1-1)*pageSize).Take(pageSize) ...
Both resolve to the same value. EF says "same value, same parameter!" Find whatever.
Except... SQL server builds and uses a different (and more costly) plan for the resulting OFFSET \@p ROWS LIMIT \@p that is consistently worse than it they had didn't values that produces OFFSET \@p1 ROWS LIMIT \@p2
Apparently it's been a known problem for a long time.
Until someone as dumb as me asks... Why not Skip as much as normal and Take one extra then don't use it the extra.
(await orderedQuery. Skip((page-1)*pageSize). Take(pageSize+1).TolistAsync()).Take(pageSize)
/1
From the archives...
KCDC 2024 Slidedeck
https://barretblake.dev/posts/conferences/2024/kcdc-2024-slidedeck/ #efcore #entityframework #slides
Blogged: Entity Framework Core 10 provider for Firebird is ready