FromSql: Writing SQL Like a Boss in EF Core
So, you’ve embraced Entity Framework Core, and life’s been good. No more handcrafting SQL for every little query. But what happens when EF Core’s LINQ magic isn’t entirely cutting it? Maybe you need something specific, like a stored procedure or a complex SQL query that LINQ doesn’t handle elegantly. That’s where FromSql swoops in to save the day.
Continue Reading
Compiled Models: The Fast Lane for EF Core Performance
Let’s talk about startup time. Not the Silicon Valley kind, but the time it takes for your EF Core app to boot up, stretch its legs, and actually start handling requests. If your app is dragging its feet like a teenager on a Monday morning, you need a secret weapon: Compiled Models.
Continue Reading
DbContext Pooling: The Secret Sauce to Faster EF Core Apps
Imagine you’re running a restaurant. Every time a customer orders, you buy a brand-new frying pan, use it once, and toss it out. Sounds absurd, right? But that’s essentially what happens in EF Core when you create a new DbContext for every request. It’s wasteful, slow, and totally unnecessary. Enter DbContext Pooling: the genius way to reuse those frying pans—err, contexts—and turbocharge your app’s performance.
Continue Reading
Accelerating EF Core with Compiled Queries
One of my passions is data! I love all forms of data and how to work with it. I am a .NET fanatic also and have been a fan of Entity Framework since 2008. It has gotten so good since .NET Core 1.0, and I love to push EF Core to the limit, especially around Web APIs. In this blog post, I want to share my ideas about Compiled Queries in EF Core.
Continue Reading