DbContext.IObjectContextAdapter.ObjectContext Property

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Returns the Entity Framework ObjectContext that is underlying this context.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private ReadOnly Property ObjectContext As ObjectContext 
    Implements IObjectContextAdapter.ObjectContext 
    Get
'Usage
Dim instance As DbContext 
Dim value As ObjectContext 

value = CType(instance, IObjectContextAdapter).ObjectContext
[SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
ObjectContext IObjectContextAdapter.ObjectContext { get; }
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
private:
virtual property ObjectContext^ ObjectContext {
    ObjectContext^ get () sealed = IObjectContextAdapter::ObjectContext::get;
}
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private abstract ObjectContext : ObjectContext
[<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")>]
private override ObjectContext : ObjectContext
JScript supports the use of explicit interface implementations, but not the declarations of new ones.

Property Value

Type: System.Data.Entity.Core.Objects.ObjectContext

Implements

IObjectContextAdapter.ObjectContext

See Also

Reference

DbContext Class

System.Data.Entity Namespace