|I'm working on an app that has two repository projects.
The first is part of my framework and is called ApplicationSecurity. It has Users, Rights, Encryption, etc. It's designed to be generic and used in any app. It expects an instance of an EF DBContext to be passed into the CTOR
The second repo project is for my app itself. Its tables are app specific. The DBContext resides in this project
So, I build the DBContext in this second project, and used it in both.
In my App.cs CTOR I have:
AppHost = Host.CreateDefaultBuilder()
.ConfigureServices((hostContext, services) =>
[ ] How do I include my DBContext here?
[ ] My ApplicationSecurity class needs an instance of the DBContext class. How can I pass a reference to a DBContext into the ApplicationSecurity CTOR?
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.