DbTransactionInterceptionContext.WithConnection(DbConnection) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立新的 DbTransactionInterceptionContext ,其中包含這個攔截內容中的所有內容資訊,以及新增指定的 DbConnection 。
public System.Data.Entity.Infrastructure.Interception.DbTransactionInterceptionContext WithConnection(System.Data.Common.DbConnection connection);
member this.WithConnection : System.Data.Common.DbConnection -> System.Data.Entity.Infrastructure.Interception.DbTransactionInterceptionContext
Public Function WithConnection (connection As DbConnection) As DbTransactionInterceptionContext
參數
- connection
- DbConnection
交易啟動所在的連接。
傳回
新的攔截內容,也包含交易啟動所在的連接。