Common mistakes in EF Core - Jernej Kavka - NDC Oslo 2023

preview_player
Показать описание
When JK worked with many different clients and projects, he frequently heard "EF Core is slow" or "We should do this in raw SQL" only to realize they haven't used EF Core correctly.

JK will show you how to improve your EF Core statements as well as how various configurations impacts the performance and scalability of your application. You'll be blown away at how small changes can significantly impact not only the performance but also stability of the application.

Check out our new channel:
NDC Clips:
@ndcclips

Check out more of our featured speakers and talks at
Рекомендации по теме
Комментарии
Автор

Excellent talk. I learned so much in only 30 mins.

vivekkaushik
Автор

Excellent Talk! Always learning something with all those NDC talks. I am going to be looking at Dapper twice before using it instead of EF

fabienWendpanga
Автор

Wow, Amazing Talking! I learned a lot, thank you!

KREKER
Автор

I think the main issue are developers who have no idea or don't care about what they are doing / how stuff works under the hood. They threat everything as a black box API (including all libraries, services and the computer itself). All that matters is closing a ticket. That's why I believe a formal education, that gives you a shallow but broad understanding of all the layers (electronics, CPU's, assembler, compilers, operating systems, .., databases, networks, cloud, ...) is extremely important. It prevents you from pulling 10M records into memory to do a count.

mekowgli
Автор

You are an EF Core expert and clean code developer.
<user instruction>
DbContext:
<optional project's DbContext, can be trimmed to include only relevant parts>
Entities:
<Only necessary entities>
Return Types:
<optional return types we want to map>

pagnew
Автор

Very good talk. Learned a lot!
Thanks!!

rezendemarcio
Автор

Amazing Talking althouth I had woked with EF for many year but your experience still valuable for me I know almost issue you talk but your bonus is pretty useful, appreciate 30 mins

victordam
Автор

This is so insightful. Learned a lot from this single video. Thanks for sharing

asiridissanayaka
Автор

51:56 It also didn't add cancellation token

Brilliant talk btw I've learned a lot from it. Simple and straight to the point. Thank you!

eddypartey
Автор

great, I learned a lot, thank you so much.

duongtrunghs
Автор

SQL Server implements AsNoTracking in a way that reduces the needs for table locks and does a DB snapshot (ReadCommitted I guess as isolation level ) that gives benefit. Most developers use SQL Server

tore
Автор

thansks a lot, I've took down a lot

jorgellanque
Автор

Its werid how it sounds so natural at 1.75x.

vivekkaushik
Автор

Enabling DbContext pooling doesn't affect DB connection pooling, which is enabled by default

viacheslavp
Автор

I was kinda skipping around so maybe I missed exactly what he was saying, but around 22:00 he's saying "do a direct projection into a container object with a Select statement instead of using .Include, because Include will cause a join and joins are bad!" The "because" half of that sentence is 100% wrong. It will still cause the SQL generated to join, and joins aren't bad because they're the entire freakin' point of a relational database, if you want to make your life hell you can go NoSQL and design around never joining, but I'll keep my relational data, thanks. The value of Select projections is that when you do that, it only queries the columns referenced by the final projection into the object. If you do DbSet.ToList() or DbSet.Include(x => x.OtherSet), then it queries *all columns* by default, so if you have 20 columns and only need 2 of 'em, that's a load of data you're sending over the wire for no reason. That's what makes it bad, not the joins.

andrewshirley
Автор

Skip to 10:00 to start to get to the point.

BryonLape
Автор

What are the differences between AddDbContextFactory vs AddDbContextPool in terms of performance?

SteveNgaiCheeWeng
Автор

Sir, Which one will be better in terms of performance ? ExecuteUpdate or execting update statement directly using EF Core.

manmohanmundhraa
Автор

Calculate how long it will take to cancel a request with a write transaction. This may surprise.

vasiliigodunov
Автор

ExecuteUpdate is introduced in .NET 7 ?

tore