IDbCommandInterceptor.DataReaderClosing Méthode

Définition

Appelé juste avant qu’EF envisage d’appeler Close().

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

Paramètres

command
DbCommand

Commande.

eventData
DataReaderClosingEventData

Informations contextuelles sur la commande.

result
InterceptionResult

Représente le résultat actuel s’il en existe un. Cette valeur aura la IsSuppressed valeur true si un intercepteur précédent a supprimé l’exécution en appelant Suppress(). Cette valeur est généralement utilisée comme valeur de retour pour l’implémentation de cette méthode.

Retours

Si IsSuppressed a la valeur false, EF continue comme d’habitude. Si IsSuppressed a la valeur true, EF supprime l’opération qu’il était sur le point d’effectuer. Une implémentation de cette méthode pour tout intercepteur qui ne tente pas de supprimer l’opération consiste à retourner la result valeur transmise.

S’applique à