DbTransactionDispatcher.GetConnection Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Sendet ConnectionGetting(DbTransaction, DbTransactionInterceptionContext<DbConnection>) und ConnectionGot(DbTransaction, DbTransactionInterceptionContext<DbConnection>) an alle IDbTransactionInterceptor registrierten vor DbInterception /nach dem Abrufen Connectionvon .
public virtual System.Data.Common.DbConnection GetConnection (System.Data.Common.DbTransaction transaction, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member GetConnection : System.Data.Common.DbTransaction * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.Common.DbConnection
override this.GetConnection : System.Data.Common.DbTransaction * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.Common.DbConnection
Public Overridable Function GetConnection (transaction As DbTransaction, interceptionContext As DbInterceptionContext) As DbConnection
Parameter
- transaction
- DbTransaction
Die Transaktion, für die der Vorgang ausgeführt wird.
- interceptionContext
- DbInterceptionContext
Optionale Informationen zum Kontext des Aufrufs.
Gibt zurück
Das Ergebnis des Vorgangs, der möglicherweise von Interceptors geändert wurde.
Hinweise
Beachten Sie, dass der Wert der -Eigenschaft von dieser Methode zurückgegeben wird. Das Ergebnis ist im an diese Methode übergebenen Abfangkontext nicht verfügbar, da der Abhörkontext geklont wird, bevor er an Interceptors übergeben wird.
Gilt für:
Entity Framework