语言

ObjectContextOptions.EnsureTransactionsForFunctionsAndCommands 属性

定义

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

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

属性值

默认事务行为。

注解

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

适用于