Use multiple databases
Been trying to figure this out. Is it possible to use a second database (second data context) inside a module?
I have a separate MSSQL database that I need to reference product data from at runtime.
Is there a proper reason to access a second database, if so I think you can register a second IDbContext then you can use DI to retrieve `IEnumerable<IDbContext>
I just implemented the IdentityServer4 persistence layer using two additional DbContexts (same postgres database like for SimplCommerce, different schema "security" though). I guess the schema of that separate database is maintained somewhere else? Do you really need to use EF for this purpose? Maybe it's enough to add a MSSQL server link and use a couple of views?