Hi everyone,
We need to use UI Builder to manage some data held in a separate database and, because of the slightly complex nature of the data we need to save/load, we're using a repository as described here:
https://docs.umbraco.com/umbraco-ui-builder/v/13.ui-builder.latest-lts/advanced/repositories
From there, we stubbed out our tree with some noddy data just to get it visible and we get an error that the table name doesn't exist (
Invalid object name 'Company'.
is the precise error message). After digging around, I can see that the scope provider that gets injected into our repository is pointing to the default Umbraco connection string even though we set the correct connection string in the application startup:
services.AddUmbracoDbContext<CustomDBContext>(options =>
{
options.UseSqlServer("name=ConnectionStrings:CustomDB");
});
I'm at a bit of a loss as to why this would be the case. Does anyone have any ideas?
Thanks