DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定決定 SQL 函式和指令是否應該在交易中始終執行的值。
public bool EnsureTransactionsForFunctionsAndCommands { get; set; }
member this.EnsureTransactionsForFunctionsAndCommands : bool with get, set
Public Property EnsureTransactionsForFunctionsAndCommands As Boolean
屬性值
預設的交易行為。
備註
此標誌決定當 ExecuteSqlCommand(String, Object[]) 方法在交易外執行時,是否會啟動新交易。 請注意,這並不會改變 的 SaveChanges()行為。