C#C
C#17mo ago
Spaxter

✅ Transient DbContext vs DbContextFactory

In EF Core, what is the difference between registering a transient DbContext vs a DbContextFactory for DI?

In both cases the DbContext will be created on-demand and disposed when the operation is completed, right? Are there any clear indications on when to use which?
Was this page helpful?