共用方式為


DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands 屬性

定義

取得或設定值,這個值會判斷 SQL 函式和命令是否應該一律在交易中執行。

public bool EnsureTransactionsForFunctionsAndCommands { get; set; }
member this.EnsureTransactionsForFunctionsAndCommands : bool with get, set
Public Property EnsureTransactionsForFunctionsAndCommands As Boolean

屬性值

預設交易行為。

備註

此旗標會決定在交易外部執行之類的 ExecuteSqlCommand(String, Object[]) 方法時,是否要啟動新的交易。 請注意,這不會變更 的行為 SaveChanges()

適用於