Data access is where most .NET apps win or lose their performance budget. EF Core isn't slow — three default behaviours are.
In this 2-minute walkthrough, I take a 1,000-row product list endpoint from 38 ms down to 8 ms using real production benchmarks, one perf lever at a time:
• Tracked Entity (default) — 38.2 ms, 4.1 MB
• AsNoTracking — 24.7 ms, 1.8 MB (-56%)
• Projection to DTO — 12.1 ms, 0.6 MB (-85%)
• EF.CompileAsyncQuery — 9.8 ms, 0.4 MB
• Dapper hand-tuned SQL — 8.4 ms, 0.3 MB
• Raw ADO.NET — 7.9 ms, 0.2 MB
Plus the hybrid pattern: EF Core for writes + most reads, Dapper for the 10% of queries where every millisecond counts — both on the same DbConnection.
Full written guide — production benchmarks, the decision matrix, the pull-request checklist, ExecuteUpdateAsync, AsSplitQuery, cursor pagination, and more:
https://prepstack.co.in/blog/dotnet-data-a...
More C# / .NET deep-dives on PrepStack:
https://prepstack.co.in/
If this helped, please like, share, and subscribe to @DevTech for more no-fluff explainers.
#EFCore #DotNet #Dapper #LINQ #CSharp #Performance #SoftwareEngineering #SQL