voronov-maxim / OdataToEntity

OData .net core
MIT License
153 stars 32 forks source link

Question: Is it possible to update DynamicDbContext connection string per each request #60

Open mikimouse77 opened 3 years ago

mikimouse77 commented 3 years ago

Currently I'm using DynamicDbContext to build EdmModel, but with multitenancy system I need to retrieve the data from different databases based on the request. I could build a different EdmModel for each tenant and then use that, but the issue is that there's limitation of 4 DynamicDbContext instances.

So my question is, is it possible to keep using DynamicDbContext but to update the database connection string per request?