언어

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

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

cancellationToken
CancellationToken

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

반품

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

구현

적용 대상