语言

DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands 属性

定义

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

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

属性值

默认事务行为。

注解

此标志确定在事务外部执行等 ExecuteSqlCommand(String, Object[]) 方法时是否启动新事务。 请注意,这不会更改 SaveChanges().

适用于