EFCore 7 Context Factory, multiple context's that can connect at runtime (Dotnet Core / Dotnet 7)

preview_player
Показать описание
Connect to one (or more!) context's at runtime using a context factory instead of a regular DBContext. Learn how and what to scaffold, what needs to be overridden, and where to apply scope. Its easy, and it won't take long to learn! You can even pick your connection string at runtime too. This example is in a dotnet 7 EFCore ASP.Net Razor pages project, but it would work (and you can follow along) using any console application or other web application template as well.
Рекомендации по теме
Комментарии
Автор

Keep making insightful videos on Entity Framework 🙏🙏

maksadnahibhoolna-wcef
Автор

Hey man, thanks for the vid. I can tell by this comment section You ain't getting enough Love. 😁✌🏿♥️

PIMARINE
Автор

You mentioned a "generic constructor" several times and what you were actually talking about is a "default constructor"

Bill-sjw
Автор

Hello Data Vids for this great video... I need your help, I am doing a minimal API that, in case of one URL parameter (ex. DBid), works with a Database or another one. I need to inject the appropiate DbContext in each EndPoint to work with the correcte Database. Could you tell me how to modify your program to do it. Thanks a lot!!!

joseptempra