Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does EF Core have a connection pool?

The DbContext of EF Core is scoped in the ASP.NET Core services. So a new DbContext is created on each request. Does this mean that a new connection is opened on each request, including all the overhead like logging in to the database? Or is there a connection pool that is independent of the DbContext?

like image 542
stefan.at.wpf Avatar asked Oct 31 '25 10:10

stefan.at.wpf


1 Answers

The underlying ADO.NET provider like System.Data.SqlClient usually implements a connection pool

like image 161
ErikEJ Avatar answered Nov 02 '25 04:11

ErikEJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!