Lingua

IDbCommandInterceptor.ScalarExecuting Metodo

Definizione

Chiamato appena prima di EF intende chiamare ExecuteScalar().

public virtual Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object> ScalarExecuting(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object> result);
public Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object> ScalarExecuting(System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData eventData, Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<object> result);
abstract member ScalarExecuting : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>
override this.ScalarExecuting : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>
abstract member ScalarExecuting : System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.Diagnostics.CommandEventData * Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj> -> Microsoft.EntityFrameworkCore.Diagnostics.InterceptionResult<obj>
Public Overridable Function ScalarExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of Object)) As InterceptionResult(Of Object)
Public Function ScalarExecuting (command As DbCommand, eventData As CommandEventData, result As InterceptionResult(Of Object)) As InterceptionResult(Of Object)

Parametri

command
DbCommand

Comando .

eventData
CommandEventData

Informazioni contestuali sul comando e sull'esecuzione.

result
InterceptionResult<Object>

Rappresenta il risultato corrente, se presente. Questo valore sarà HasResult impostato su true se un precedente intercettore ha eliminato l'esecuzione chiamando SuppressWithResult(TResult). Questo valore viene in genere usato come valore restituito per l'implementazione di questo metodo.

Valori restituiti

Se HasResult è false, Entity Framework continuerà come di consueto. Se HasResult è true, Entity Framework elimina l'operazione che sta per eseguire e usare Result . Un'implementazione di questo metodo per qualsiasi intercettore che non tenta di modificare il risultato consiste nel restituire il result valore passato.

Si applica a