다음을 통해 공유


RelationalLoggerExtensions.CommandNonQueryExecutedAsync 메서드

정의

이벤트에 대한 로그입니다 CommandExecuted .

public static System.Threading.Tasks.Task<int> CommandNonQueryExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, int methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.ValueTask<int> CommandNonQueryExecutedAsync (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, int methodResult, DateTimeOffset startTime, TimeSpan duration, System.Threading.CancellationToken cancellationToken = default);
static member CommandNonQueryExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * int * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
static member CommandNonQueryExecutedAsync : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * int * DateTimeOffset * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<int>
<Extension()>
Public Function CommandNonQueryExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Integer, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
<Extension()>
Public Function CommandNonQueryExecutedAsync (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, command As DbCommand, context As DbContext, commandId As Guid, connectionId As Guid, methodResult As Integer, startTime As DateTimeOffset, duration As TimeSpan, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Integer)

매개 변수

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

사용할 진단 로거입니다.

connection
IRelationalConnection

연결입니다.

command
DbCommand

데이터베이스 명령 개체입니다.

context
DbContext

현재 사용 중인 입니다 DbContext . 알 수 없는 경우 null입니다.

commandId
Guid

지정된 DbCommand와 연결된 상관 관계 ID입니다.

connectionId
Guid

사용 중인 과 DbConnection 연결된 상관 관계 ID입니다.

methodResult
Int32

기본 메서드 실행의 반환 값입니다.

startTime
DateTimeOffset

실행이 시작된 시간입니다.

duration
TimeSpan

결과 소비를 포함하지 않는 명령 실행 기간입니다.

cancellationToken
CancellationToken

취소 토큰입니다.

반환

인터셉터에 의해 수정되었을 수 있는 실행 결과입니다.

적용 대상