Sql – ADO.NET + LINQ Connection = Can they reuse the same

ado.netconnection-poolinglinq-to-sqlnetsql server

I have an ADO.NET connection object to an SQL Server (which will use connection pooling and all the nice things about it) in one Winforms application.

We're adding some new stuff to this application and we thought that we could do it in LINQ to SQL, the question is, if we open a new connection like this:

MyDataContext dc = new MyDataContext(Connection_String_To_The_Same_SQLServer);

…if the Connection string is the same we're using on our "old" ADO.NET methods, will this benefit from pooling or will start a new connection?

Best Answer

It will use pooling just the same as any other bit of ADO.NET. It's all built on the same infrastructure.

Related Topic