ObjectContextOptions.EnsureTransactionsForFunctionsAndCommands 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值确定是否应始终在事务中执行 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()。