ObjectContextOptions.EnsureTransactionsForFunctionsAndCommands 属性

定义

获取或设置一个值,该值确定是否应始终在事务中执行 SQL 函数和命令。

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

属性值

默认事务行为。

注解

此标志确定当和 ExecuteStoreCommand(String, Object[])ExecuteFunction(String, ObjectParameter[])方法在事务外部执行时,是否将启动新事务。 请注意,这不会更改 的行为 SaveChanges()

适用于