언어

DatabaseFacade.AutoTransactionsEnabled 속성

정의

주의

Use AutoTransactionBehavior instead

주의

Use EnableAutoTransactions instead

'BeginTransaction' 또는 'UseTransaction' 메서드가 호출되지 않은 경우 트랜잭션이 자동으로 SaveChanges() 생성되는지 여부를 나타내는 값을 가져오거나 설정합니다.

public virtual bool AutoTransactionsEnabled { get; set; }
[System.Obsolete("Use AutoTransactionBehavior instead")]
public virtual bool AutoTransactionsEnabled { get; set; }
[System.Obsolete("Use EnableAutoTransactions instead")]
public virtual bool AutoTransactionsEnabled { get; set; }
member this.AutoTransactionsEnabled : bool with get, set
[<System.Obsolete("Use AutoTransactionBehavior instead")>]
member this.AutoTransactionsEnabled : bool with get, set
[<System.Obsolete("Use EnableAutoTransactions instead")>]
member this.AutoTransactionsEnabled : bool with get, set
Public Overridable Property AutoTransactionsEnabled As Boolean

속성 값

특성

설명

이 값을 설정하면 false 다음 항목도 사용하지 않도록 설정 IExecutionStrategy 됩니다. SaveChanges()

기본값은 변경 내용을 저장할 때 항상 트랜잭션을 사용한다는 SaveChanges() 의미입니다true.

오류가 발생할 경우 데이터베이스가 일관성 없는 상태로 남을 수 있으므로 이 값을 false 설정하려면 주의해야 합니다.

자세한 내용 및 예제는 EF Core의 트랜잭션 을 참조하세요.

적용 대상