Context Options Builder. Enable Service Provider Caching(Boolean) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enables or disables caching of internal service providers. Disabling caching can massively impact performance and should only be used in testing scenarios that build many service providers for test isolation.
Note that if the application is setting the internal service provider through a call to UseInternalServiceProvider(IServiceProvider), then setting this option wil have no effect.
public virtual Microsoft.EntityFrameworkCore.DbContextOptionsBuilder EnableServiceProviderCaching (bool cacheServiceProvider = true);
abstract member EnableServiceProviderCaching : bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder override this.EnableServiceProviderCaching : bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
Public Overridable Function EnableServiceProviderCaching (Optional cacheServiceProvider As Boolean = true) As DbContextOptionsBuilder
true, then the internal service provider is cached.
The same builder instance so that multiple calls can be chained.