Users want the ability to register a DbContext with its own connection string without it being overridden by the main database connection.
## Summary `AddUmbracoDbContext<T>()` does not support DbContexts that target a **separate database**. When a package registers a DbContext with its own connection string, `EFCoreScope.InitializeDatabase()` unconditionally overrides it with the parent NPoco scope's connection — which points to Umbraco's main database. This is related to but distinct from #22124 (which covers the `ProfiledDbConnection` NRE on pool reuse). ## Affected versions - Umbraco 17.x (confirmed on 17.1.0) - Likely affects all versions with `AddUmbracoDbContext` ## Repro 1. Create a package with its own EF Core DbContext targeting a **separate** database via a custom connection string (e.g. `umbracoMyPackageDbDSN`) 2. Register it using `AddUmbracoDbContext<MyDbContext>()`, configuring the separate connection string in the options action: ```csharp builder.Services.AddUmbracoDbContext<MyDbContext>((_, options, _, _) => { options.UseSqlite(myOwnConnectionString, x => ...); }); ``` 3. Use