0

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;

  1. 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

TunedBy
  • 73
  • 1
  • 7
  • Point b seems the focus on your question, but your question is quite broad, making it hard to write a short and concise answer to your question. Can you update your question and make the problem more clear by showing a minimal reproducible code example that demonstrates the problem? – Steven May 16 '22 at 08:20
  • updated, hopefully that's a bit more concise – TunedBy May 16 '22 at 20:56
  • See https://stackoverflow.com/help/minimal-reproducible-example – Steven May 17 '22 at 06:58

0 Answers0