DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands Property

Definition

Gets or sets the value that determines whether SQL functions and commands should be always executed in a transaction.

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

Property Value

The default transactional behavior.

Remarks

This flag determines whether a new transaction will be started when methods such as ExecuteSqlCommand(String, Object[]) are executed outside of a transaction. Note that this does not change the behavior of SaveChanges().

Applies to