[Solved] Entity framework long living data context vs short living data context [closed]


Open and close as quickly as possible. Let ADO.Net connection pooling take care of minimizing overhead of actually connecting to the database over and over. As long as you use the same connection string, closing a connection does not actually close it. It just releases it back to ADO.Net connection pool. The longer you keep it open, (and not in the pool), the more actual connections the pool may need to create to service the database requests.

solved Entity framework long living data context vs short living data context [closed]