다음을 통해 공유


RelationalLoggerExtensions.CommandCreating 메서드

정의

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

public static Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating (this Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> diagnostics, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod commandMethod, Microsoft.EntityFrameworkCore.DbContext context, Guid commandId, Guid connectionId, DateTimeOffset startTime);
static member CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Database.Command> * Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
<Extension()>
Public Function CommandCreating (diagnostics As IDiagnosticsLogger(Of DbLoggerCategory.Database.Command), connection As IRelationalConnection, commandMethod As DbCommandMethod, context As DbContext, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset) As InterceptionResult(Of DbCommand)

매개 변수

diagnostics
IDiagnosticsLogger<DbLoggerCategory.Database.Command>

사용할 진단 로거입니다.

connection
IRelationalConnection

연결입니다.

commandMethod
DbCommandMethod

이 명령에서 호출될 메서드의 형식입니다.

context
DbContext

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

commandId
Guid

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

connectionId
Guid

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

startTime
DateTimeOffset

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

반환

가로채는 결과입니다.

적용 대상