DbContextConfiguration.EnsureTransactionsForFunctionsAndCommands Property

Entity Framework 6.0

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

Namespace:   System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

public bool EnsureTransactionsForFunctionsAndCommands { get; set; }

Property Value

Type: System.Boolean

The default transactional behavior.

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

Return to top