DatabaseFacade.AutoTransactionBehavior Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether or not a transaction will be created automatically by SaveChanges() if neither 'BeginTransaction' nor 'UseTransaction' has been called.
public virtual Microsoft.EntityFrameworkCore.AutoTransactionBehavior AutoTransactionBehavior { get; set; }
member this.AutoTransactionBehavior : Microsoft.EntityFrameworkCore.AutoTransactionBehavior with get, set
Public Overridable Property AutoTransactionBehavior As AutoTransactionBehavior
Property Value
Remarks
The default setting is WhenNeeded.
Setting this to Never with caution, since the database could be left in an inconsistent state if failure occurs.
See Transactions in EF Core for more information and examples.
Applies to
Entity Framework