- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Stop Running EF Core Queries One-By-One (Do This Instead)
Want to master Clean Architecture? Go here: https://bit.ly/3PupkOJ
Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt
🚀 Want a real performance boost in EF Core?
A common API pattern is loading multiple independent datasets in a single request (think dashboards: users + orders + logs). The naïve approach runs queries sequentially… and your latency adds up fast.
So you try Task.WhenAll — and EF Core throws the classic error:
“A second operation was started on this context…”
In this video, I’ll show you the right way to execute EF Core queries concurrently without crashing your app.
- What you’ll learn
- Why DbContext can’t run concurrent operations (even with async/await)
- The dashboard scenario where parallel queries make a big difference
- How to use IDbContextFactory to create a separate DbContext per query
- A clean helper pattern to keep query code reusable
- How to verify concurrency with tracing + measure the win
- Tradeoffs to consider (more contexts, more connections)
DbContext is Not Thread-Safe: Parallelizing EF Core Queries the Right Way
https://www.milanjovanovic.tech/blog/dbcontext-is-not-thread-safe-parallelizing-ef-core-queries-the-right-way
Check out my courses:
https://www.milanjovanovic.tech/courses
Read my Blog here:
https://www.milanjovanovic.tech/blog
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Chapters
Видео Stop Running EF Core Queries One-By-One (Do This Instead) канала Milan Jovanović
Want to unlock Modular Monoliths? Go here: https://bit.ly/3SXlzSt
🚀 Want a real performance boost in EF Core?
A common API pattern is loading multiple independent datasets in a single request (think dashboards: users + orders + logs). The naïve approach runs queries sequentially… and your latency adds up fast.
So you try Task.WhenAll — and EF Core throws the classic error:
“A second operation was started on this context…”
In this video, I’ll show you the right way to execute EF Core queries concurrently without crashing your app.
- What you’ll learn
- Why DbContext can’t run concurrent operations (even with async/await)
- The dashboard scenario where parallel queries make a big difference
- How to use IDbContextFactory to create a separate DbContext per query
- A clean helper pattern to keep query code reusable
- How to verify concurrency with tracing + measure the win
- Tradeoffs to consider (more contexts, more connections)
DbContext is Not Thread-Safe: Parallelizing EF Core Queries the Right Way
https://www.milanjovanovic.tech/blog/dbcontext-is-not-thread-safe-parallelizing-ef-core-queries-the-right-way
Check out my courses:
https://www.milanjovanovic.tech/courses
Read my Blog here:
https://www.milanjovanovic.tech/blog
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Chapters
Видео Stop Running EF Core Queries One-By-One (Do This Instead) канала Milan Jovanović
Комментарии отсутствуют
Информация о видео
26 декабря 2025 г. 17:01:54
00:11:20
Другие видео канала





















