SaveChangesInterceptor.ThrowingConcurrencyExceptionAsync 메서드

정의

EF가 을 throw하기 직전에 호출됩니다 DbUpdateConcurrencyException.

public virtual System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult> ThrowingConcurrencyExceptionAsync (Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult result, System.Threading.CancellationToken cancellationToken = default);
abstract member ThrowingConcurrencyExceptionAsync : Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
override this.ThrowingConcurrencyExceptionAsync : Microsoft.EntityFrameworkCore.Diagnostics.ConcurrencyExceptionEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult>
Public Overridable Function ThrowingConcurrencyExceptionAsync (eventData As ConcurrencyExceptionEventData, result As InterceptionResult, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of InterceptionResult)

매개 변수

eventData
ConcurrencyExceptionEventData

동시성 충돌에 대한 컨텍스트 정보입니다.

result
InterceptionResult

있는 경우 현재 결과를 나타냅니다. 이전의 일부 인터셉터에서 를 호출Suppress()하여 true 실행을 억제한 경우 이 값은 로 설정됩니다IsSuppressed. 이 값은 일반적으로이 메서드의 구현에 대 한 반환 값으로 사용 합니다.

cancellationToken
CancellationToken

CancellationToken 작업이 완료 될 때까지 기다리는 동안 관찰할 입니다.

반환

false이면 IsSuppressed EF에서 예외를 throw합니다. 가 이trueIsSuppressed EF는 예외를 throw하지 않습니다. 속성 값을 설정하지 않으려고 시도하지 않는 인터셉터에 대해 이 메서드를 구현하려면 전달된 값을 반환 result 해야 합니다.

구현

적용 대상