I want to enable DbContextPool in my solution, but I don't want to use the connection string that is shared with other code that should not be pooled. The AddDbContextPool extension requires that it be called from IServiceCollection and I haven't found a way to modify the registration in ABP. I saw a previous answer that I can't apply: can I have an example with the code?
And here is the example code :
Configure<AbpDbContextOptions>(options => { // add support to second level cache in ABP options.Configure(d => { if (enableSecondLevelCache) { d.DbContextOptions.AddInterceptors(d.ServiceProvider.GetRequiredService<SecondLevelCacheInterceptor>()); } /* The main point to change your DBMS. * See also BloxDbContextFactory for EF Core tooling. */ d.UseNpgsql(); }); });
Thanks
- ABP Framework version: v6.0.3
- UI type: Angular
- DB provider: EF Core
1 Answer(s)
-
0
hi
Sorry, The abp framework doesn't support
DbContextPool