i'm piecing together EF and DI, i have a beginners understanding in it and im trying to solve for the following (in the one solution);
I have a web app (blazor web assembly) which has two projects (Client / Server) I have a separate console app which will run off a service bus queue and needs to interact with the EF model in the server project The solution is multi-tenant, so i send the client ID as a part of the request to the console app which will tell the app (and dbContext) which tenant DB to connect to
i have added the server project reference to the console app, and what i have the console app currently listening to a service bus queue and executing the required processing with dummy stub data.
what i need help with is how to setup the console app in .net6.0 to;
- establish a transient DI database dbContext which uses the other project EF model AND establishes a tenant db connection on each execute (service bus post)
as a result of the processing i may need to also send a request to another service bus queue for other processing / actions / etc. so i'm assuming a singleton service for that....???
i know the model, just not sure on how to code...
it's fairly simple and would probably take a dev about 15 minutes to configure... i'm not a good dev though :D