You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In .NET 6, .AddScoped(typeof(IRepository<>), typeof(CosmosDbRepository<>)) has to be added to the Sparc project's Startup file in order for the repository to be registered in DI. Otherwise the repository lookup fails at runtime. This line of code already exists in both ServiceCollectionExtensions for Cosmos & SQL, so it seems .NET 6 might have messed w/ some DI things as far as ordering and parallel registration.
The text was updated successfully, but these errors were encountered:
In .NET 6,
.AddScoped(typeof(IRepository<>), typeof(CosmosDbRepository<>))
has to be added to the Sparc project's Startup file in order for the repository to be registered in DI. Otherwise the repository lookup fails at runtime. This line of code already exists in both ServiceCollectionExtensions for Cosmos & SQL, so it seems .NET 6 might have messed w/ some DI things as far as ordering and parallel registration.The text was updated successfully, but these errors were encountered: