Langue

DbCommandInterceptor.DataReaderClosing Méthode

Définition

Appelé juste avant qu’EF ait l’intention 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 a IsSuppressed la valeur si true 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 c’est falsele cas, EF continuera normalement. Si IsSuppressed c’est truele cas, 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 passée.

Implémente

S’applique à