ObjectContext.IObjectContextAdapter.ObjectContext 属性

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

返回自身。 ObjectContext 实现 IObjectContextAdapter 以便为 DbContext 和 ObjectContext(这两者将返回基础 ObjectContext)提供通用接口。

命名空间:  System.Data.Entity.Core.Objects
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private ReadOnly Property ObjectContext As ObjectContext 
    Implements IObjectContextAdapter.ObjectContext 
    Get
用法
Dim instance As ObjectContext 
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.

属性值

类型:System.Data.Entity.Core.Objects.ObjectContext

Implements

IObjectContextAdapter.ObjectContext

请参阅

参考

ObjectContext 类

System.Data.Entity.Core.Objects 命名空间