語言

DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands 屬性

定義

取得或設定決定 SQL 函式和指令是否應該在交易中始終執行的值。

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

屬性值

預設的交易行為。

備註

此標誌決定當 ExecuteSqlCommand(String, Object[]) 方法在交易外執行時,是否會啟動新交易。 請注意,這並不會改變 的 SaveChanges()行為。

適用於