DbConnectionDispatcher.GetState(DbConnection, DbInterceptionContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sends StateGetting(DbConnection, DbConnectionInterceptionContext<ConnectionState>) and StateGot(DbConnection, DbConnectionInterceptionContext<ConnectionState>) to any IDbConnectionInterceptor registered on DbInterception before/after getting State.
public virtual System.Data.ConnectionState GetState (System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
override this.GetState : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> System.Data.ConnectionState
Public Overridable Function GetState (connection As DbConnection, interceptionContext As DbInterceptionContext) As ConnectionState
Parameters
- connection
- DbConnection
The connection on which the operation will be executed.
- interceptionContext
- DbInterceptionContext
Optional information about the context of the call being made.
Returns
The result of the operation, which may have been modified by interceptors.
Remarks
Note that the value of the property is returned by this method. The result is not available in the interception context passed into this method since the interception context is cloned before being passed to interceptors.
Applies to
Entity Framework