Microsoft.EntityFrameworkCore.MaterializationInterceptionCosmosTest.Intercept_query_materialization_for_full_constructor(inject: False)
System.InvalidOperationException : An error was generated for warning 'Microsoft.EntityFrameworkCore.Infrastructure.ManyServiceProvidersCreatedWarning': More than twenty 'IServiceProvider' instances have been created for internal use by Entity Framework. This is commonly caused by injection of a new singleton service instance into every DbContext instance. For example, calling 'UseLoggerFactory' passing in a new instance each time--see https://go.microsoft.com/fwlink/?linkid=869049 for more details. This may lead to performance issues, consider reviewing calls on 'DbContextOptionsBuilder' that may require new service providers to be built. This exception can be suppressed or logged by passing event ID 'CoreEventId.ManyServiceProvidersCreatedWarning' to the 'ConfigureWarnings' method in 'DbContext.OnConfiguring' or 'AddDbContext'.
at Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition.Log[TLoggerCategory](IDiagnosticsLogger`1 logger, Exception exception) in C:\local\code\efcore\src\EFCore\Diagnostics\EventDefinition.cs:line 68
at Microsoft.EntityFrameworkCore.Diagnostics.CoreLoggerExtensions.ManyServiceProvidersCreatedWarning(IDiagnosticsLogger`1 diagnostics, ICollection`1 serviceProviders) in C:\local\code\efcore\src\EFCore\Diagnostics\CoreLoggerExtensions.cs:line 962
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<GetOrAdd>g__BuildServiceProvider|4_1(IDbContextOptions _, ValueTuple`2 arguments) in C:\local\code\efcore\src\EFCore\Internal\ServiceProviderCache.cs:line 155
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.<>c.<GetOrAdd>b__4_0(IDbContextOptions contextOptions, ValueTuple`2 tuples) in C:\local\code\efcore\src\EFCore\Internal\ServiceProviderCache.cs:line 70
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd[TArg](TKey key, Func`3 valueFactory, TArg factoryArgument)
at Microsoft.EntityFrameworkCore.Internal.ServiceProviderCache.GetOrAdd(IDbContextOptions options, Boolean providerRequired) in C:\local\code\efcore\src\EFCore\Internal\ServiceProviderCache.cs:line 68
at Microsoft.EntityFrameworkCore.DbContext..ctor(DbContextOptions options) in C:\local\code\efcore\src\EFCore\DbContext.cs:line 128
at Microsoft.EntityFrameworkCore.TestUtilities.PoolableDbContext..ctor(DbContextOptions options) in C:\local\code\efcore\test\EFCore.Specification.Tests\TestUtilities\PoolableDbContext.cs:line 14
at Microsoft.EntityFrameworkCore.SingletonInterceptorsTestBase`1.LibraryContext..ctor(DbContextOptions options) in C:\local\code\efcore\test\EFCore.Specification.Tests\SingletonInterceptorsTestBase.cs:line 74
at Microsoft.EntityFrameworkCore.MaterializationInterceptionCosmosTest.CosmosLibraryContext..ctor(DbContextOptions options) in C:\local\code\efcore\test\EFCore.Cosmos.FunctionalTests\MaterializationInterceptionCosmosTest.cs:line 21
at Microsoft.EntityFrameworkCore.MaterializationInterceptionCosmosTest.CreateContext(IEnumerable`1 interceptors, Boolean inject) in C:\local\code\efcore\test\EFCore.Cosmos.FunctionalTests\MaterializationInterceptionCosmosTest.cs:line 34
at Microsoft.EntityFrameworkCore.MaterializationInterceptionTestBase`1.Intercept_query_materialization_for_full_constructor(Boolean inject) in C:\local\code\efcore\test\EFCore.Specification.Tests\MaterializationInterceptionTestBase.cs:line 427
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)