EF Core 7 🚀 Multiple Databases, DbContexts & Relationships (Entity Framework 7)

  Рет қаралды 15,771

Patrick God

Patrick God

Күн бұрын

Пікірлер: 33
@davidarayacadiz7675
@davidarayacadiz7675 Жыл бұрын
I'm from Chile, I found your channel about 3 days ago and currently, I'm developing a .NET 7 web API for college and your videos were so helpful! Thank you so much.
@PatrickGod
@PatrickGod Жыл бұрын
Thanks a lot for your feedback, David! Really glad I could help! 😊
@mtranchi
@mtranchi Жыл бұрын
5:58 You can specify the output directories with a "-o" parameter. It doesn't even have to be in the Migrations folder.
@PatrickGod
@PatrickGod Жыл бұрын
Hey there! You're absolutely right. Thanks for pointing that out. 😊
@The-Z-Zone
@The-Z-Zone Жыл бұрын
Great tutorial. Most EF examples that I have seen have always been a 1:1 between app and database so this was nice to see in operation.
@cyrmee
@cyrmee Жыл бұрын
I was searching for this topic in the past few months. Thanks!
@PatrickGod
@PatrickGod Жыл бұрын
Welcome! Glad I could help! 😊
@JtendraShahani
@JtendraShahani Жыл бұрын
I was searching for a video on this topic. Thank you so much.
@PatrickGod
@PatrickGod Жыл бұрын
Glad I could help! 😊
@mehretabhailegebriel
@mehretabhailegebriel Жыл бұрын
@@PatrickGod Can you show us how we can manage JWT, like revoking and refreshing, in a web API app?
@clyntneikorupinta5760
@clyntneikorupinta5760 Жыл бұрын
Thanks a lot always for the video!. It would be great if you can make a topic about ef core with multithreading
@raggardy
@raggardy Жыл бұрын
Cheers Patrick! Great job
@PatrickGod
@PatrickGod Жыл бұрын
Thank you so much, Darren! 😀
@jeanmas4197
@jeanmas4197 Жыл бұрын
You can specify the folder where the migration goes. I find that handy to keep everything well organized
@joaogabrielv.m328
@joaogabrielv.m328 Жыл бұрын
Thanks a lot for the video, God. Keep up
@user-um4sp8gf4p
@user-um4sp8gf4p Жыл бұрын
Patrick good tutorial you can make the relation between the user table and character table in view model table rather the in the actual user model
@TheYassha
@TheYassha 3 ай бұрын
Thanks that was really helpful.
@alexmadnix
@alexmadnix Жыл бұрын
Thanks God!!
@PatrickGod
@PatrickGod Жыл бұрын
You're welcome! 😊
@abhinavsrivastava2128
@abhinavsrivastava2128 Жыл бұрын
nice video... For anyone thinking about writes to multiple dbs - Saga
@nderrickharris
@nderrickharris Жыл бұрын
It would be great if your next topic would be 2 DBContexts (Config, AppData) where the connection string for the second one(AppData) is stored in the first Database(Config). For a sharded multi-tenant example.
@zoiobnu
@zoiobnu Жыл бұрын
I never see a good multi-tenant tutorial for free
@asdasdaa7063
@asdasdaa7063 6 ай бұрын
Is this still the case in .net 8? meaning you have to do it manually?
@releyshic
@releyshic 2 ай бұрын
What for we will need few contexts?
@10Totti
@10Totti Жыл бұрын
Migrations is possible now also with Visual Studio UI.
@broadshare
@broadshare 8 ай бұрын
It would be better showing multi-tenancy application where users/customers have each their own dbcontext using same app. Think of something like quickbooks. It's not realistic to have diff dbs in this case videos games
@axelbryancasauran5159
@axelbryancasauran5159 Жыл бұрын
can we use this for switching of database? for example --user1 registered in DB1, user2 registered in DB2 --when they login they will be connecting automatically in their registered DB.. is it possible here?
@hero1v1
@hero1v1 9 ай бұрын
How to add a Generic Repository pattern on top of this?
@SrabanNadimulIslamBhuyan
@SrabanNadimulIslamBhuyan Жыл бұрын
is it possible to use multiple dbcontext in entity framework core that can share some tables such as Tenant, User, etc. in both context, but want to create table only from first context's migration, btw: I have one database, and I want to use different scheema. such as shared.tableName, sales.tableName, etc. actually I want to make moduler monolith application.
@user-gq8hg7xt1s
@user-gq8hg7xt1s Жыл бұрын
Hey there! Thank you for the video! Is it worth creating multiple DbContexts at all, and is it worth separating IdentityDbContext into a separate database? Does anyone actually do this in real projects?
@pablotruffa588
@pablotruffa588 9 ай бұрын
Yes, it is worth because authentication and authorization are abstracted from business logic. But in this case scenario i would create a "UserTableInfo" in the characters dbcontext. Imagine if you want to get all the characters and their users, in this example you ll have to foreach loop all characters asking for theirs users. Multiple database queries. So whenever a user gets registered in one database you can add some userinfo in the characters userinfo table (other database), such as name,email, etc no sensitive info like passwords, etc so you can map faster with a simple Join
@luisfernandodeolazabalsche3317
@luisfernandodeolazabalsche3317 Жыл бұрын
😃😃😃😃😃
CRUD Operation in ASP.NET Core using Visual Studio 2022
8:04
Code With Yousaf
Рет қаралды 96 М.
ShadCN’s Revolutionary New CLI
12:11
Jack Herrington
Рет қаралды 27 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 32 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 48 МЛН
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 178 М.
Stored Procedures with Entity Framework Core in .NET 6 🚀
13:51
The Logging Everyone Should Be Using in .NET
15:34
Nick Chapsas
Рет қаралды 65 М.
.NET in 300 seconds
5:48
Amichai Mantinband
Рет қаралды 71 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 157 М.
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 30 М.
Entity Framework with MySql
15:31
Ripon Datta
Рет қаралды 20 М.
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 32 МЛН