Starts in:
1 DAY
7 HRS
20 MIN
6 SEC
Starts in:
1 D
7 H
20 M
6 S
Open Closed

Enable DbContextPool in ABP #4808


User avatar
0
Payoff created

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)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Sorry, The abp framework doesn't support DbContextPool

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06