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