I'm doing something completely normal - registering Insight.Database autointerfaces in WebApi DI.
Here's the code -
var dataString = builder.Configuration.GetConnectionString("DefaultConnection");
SqlInsightDbProvider.RegisterProvider();
var connection = new SqlConnection(dataString);
builder.Services.AddTransient(thing => connection.AsParallel<IUserData>());
builder.Services.AddTransient(thing => connection.AsParallel<IRoleData>());
And I'm getting this bizarre error at the point where the injected interfaces are used in a controller.
And there's no documentation on it. Nothing has changed from other projects where it works perfectly fine. It's just... broken.
Any help would be hugely appreciated
Editing to add stack trace