Shiraz Bhaiji
Shiraz Bhaiji

Reputation: 65391

What happens when you close an Entity Framework connection

We are using Entity Framework 1.0.

In some cases we need to explicitly open connections, and then need to explicitly close connections. See http://msdn.microsoft.com/en-us/library/bb738582.aspx

My question is, when we call "close" does the connection actually get closed, or is it just returned to the connection pool?

Upvotes: 1

Views: 896

Answers (1)

Nix
Nix

Reputation: 58522

No when you call close it will return to the pool.

If you want to "free" the pool aka term connections use ClearAllPools

MSDN on connection pooling, it always helps when i reference that.

Upvotes: 1

Related Questions