A SqlConnection consists of two parts: the public instance that your code interacts with (the outer connection) and a hidden connection that represents an actual server connection (the inner connection).
When you call the Open method on the outer connection, the connection manager looks for a free inner connection from the pool that is associated with the transaction. It will create a new inner connection if one does not exist. When the Close method is called on the outer connection, it returns the inner connection to the pool, where the connection State is reset to ensure a clean slate when it is reused from the pool. SQL Server does not distinguish between the outer and inner connections, so only one outer connection can be used with one inner connection at a time.
When a pooled connection is reset, cursors are closed, options are set back to defaults, the database context is switched back to the one specified in the connection string, and all outstanding local transactions are rolled back. This behavior provides a known starting state every time that you open a connection from the pool. It also prevents you from reusing the inner connection until the local transaction finishes. When you close the transaction's outer connection, the inner connection is set aside pending a commit or rollback request from the transaction manager. When you open a new outer connection while the inner connection is still active, the pool will be empty, and a new inner connection is created. The local transaction manager will then detect that two different resources are trying to enlist in the same transaction. Because SQL Server connections cannot share in local transactions, the transaction manager must promote the transaction to a full distributed transaction.
以上来自于MSDN: http://msdn.microsoft.com/en-us/library/ms172070(v=vs.90).aspx
简言之,"SqlConnection " 由两部份组成:外部可操作实例和内部隐藏的连接。
当调用外部连接的open方法的时候,连接管理类寻找一个内部连接去关联。当找不到对应的内部连接时,将会创建一个内部连接实例。
当调用外部连接的close方法的时候,连接管理类将内部连接状态标记为等待提交或者回滚。一直等待提交或者回滚以后,将这个内部连接扔会到连接池,然后重置内部连接以备用。
这就是为什么命名SqlConnection都已经被close,相关的Transactions仍然能够被回滚,因为真正的连接并没有断开。