언어

IDbCommandInterceptor.CommandCreating 메서드

정의

EF가 호출하기 직전에 호출 CreateCommand()됩니다.

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating(Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> result);
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> CommandCreating(Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> result);
abstract member CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
override this.CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
abstract member CommandCreating : Microsoft.EntityFrameworkCore.Diagnostics.CommandCorrelatedEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<System.Data.Common.DbCommand>
Public Overridable Function CommandCreating (eventData As CommandCorrelatedEventData, result As InterceptionResult(Of DbCommand)) As InterceptionResult(Of DbCommand)
Public Function CommandCreating (eventData As CommandCorrelatedEventData, result As InterceptionResult(Of DbCommand)) As InterceptionResult(Of DbCommand)

매개 변수

eventData
CommandCorrelatedEventData

명령 및 실행에 대한 컨텍스트 정보입니다.

result
InterceptionResult<DbCommand>

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

반품

false이면 HasResult EF는 정상적으로 계속됩니다. true이면 HasResult EF가 수행하려고 하던 작업을 표시하지 않고 대신 사용합니다 Result . 결과를 변경하려고 하지 않는 모든 인터셉터에 대해 이 메서드의 구현은 전달된 값을 반환 result 하는 것입니다.

적용 대상