Entity Framework Core 6 Design Question
-
I'm new to EF, so bear with me. I have my own framework that I've been using for years. One assembly, AppSecurity, is responsible for logging in, roles, rights, etc. Up to now it was done in Linq-To-SQL. I'm looking to convert it to Entity Framework Core. When I created a new project that needed app security, I reference my AppSecurity assembly and passed in a connection string or DBContext. This has been working fine for years. But now, for EF, I'm not sure how to set this up. Let's say I'm creating a WPF app called MyNewApp. It has a repository class and manages its own data. But for the security portion I want to use my AppSecurity. So there are two different DBContext classes. How do I run migrations? Can I run migrations on two different projects? Will one overwrite the other?
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.