我們使用static和[ThreadStatic]屬性來保證一個線程拿到的TYEntities(ObjectContext)總是同一個,這就解決了Transaction事務的問題。沒有解釋到的請詳細閱讀下面代碼里面的注釋。 復制代碼代碼如下: using System; using System.Collections.Generic; using System.Linq; ...
Public objContext As ObjectContext Public Application As ASPTypeLibrary.Application Public Server As ASPTypeLibrary.Server Public Session As ASPTypeLibrary.Session Public Response As ASPTypeLibrary.Response Public Request As ASPTypeLibrary.Request