LINQ in Action roller

Closing Connections

Hopefully this is a very simple question. In my ASP.net application after running a Linq statement do I need to explicitly close the database connection and set the Linq object to nothing? I've found I can do this: Dim DB as new MyDBNameDataContext Dim Linq_Results = From ............ ... ... Linq_Results = nothing DB.Connection.close() If I don't do the DB.connection.close() will it automatically be closed somehow? I'm just looking for the best way to optimize the connection pooling and being as Read More...
Published Thursday, February 28, 2008 12:26 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication