Skip to content

Add a parameterless AddPooledDbContextFactory overload #34658

@christophe-mommer

Description

@christophe-mommer

Why does the EF Core 9 method AddPooledDbContextFactory<> doesn't have a parameterless method, like AddDbContextFactory<> ?
I'm using the DbContext in two different way:
AddDbContext<> for my MVC pages
AddPooledDbContextFactory<> for my Blazor components integrated in my MVC app

However, I need to switch back to AddDbContextFactory, because the AddPooledDbContextFactory doesn't have any parameterless method and beause of the new way to handle configuration, I need to call ConfigureDbContext<>(opt=>{...}) before my registrations to avoid exceptions.

EF Core version: EF Core 9 RC1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 9
Operating system: Windows 11
IDE: Visual Studio 2022 17.12 p2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions