Sharing transactions between connections
问题 I have a FileShare crawler (getting permissions and dropping them somewhere for later Audit). Currently it is starting multiple threads to crawl the same folder (to speed up the process). In C#, each SqlConnection object has its own SqlTransaction , initiated by the SqlConnection.BeginTransaction() call. Here is the pseudo code of the current solution: Get list of folders For each folder get list of sub-folders For each sub folder start a thread to collect file shares Each thread will save