Поделиться через


DbContext.IObjectContextAdapter.ObjectContext - свойство

[Эта страница относится к документации к Entity Framework 6. Последняя версия доступна в составе пакета Entity Framework NuGet. Дополнительные сведения об Entity Framework см. в разделе msdn.com/data/ef.]

Возвращает объект Entity Framework ObjectContext, который является базовым для данного контекста.

Пространство имен:  System.Data.Entity
Сборка:  EntityFramework (в EntityFramework.dll)

Синтаксис

'Декларация
<SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")> _
Private ReadOnly Property ObjectContext As ObjectContext 
    Implements IObjectContextAdapter.ObjectContext 
    Get
'Применение
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.

Значение свойства

Тип: System.Data.Entity.Core.Objects.ObjectContext

Implements

IObjectContextAdapter.ObjectContext

См. также

Справочник

DbContext Класс

System.Data.Entity - пространство имен