DbContext.GetType Method

[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 type for the current DbContext.

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

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
<EditorBrowsableAttribute(EditorBrowsableState.Never)> _
Public Function GetType As Type
'Usage
Dim instance As DbContext 
Dim returnValue As Type 

returnValue = instance.GetType()
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
[EditorBrowsableAttribute(EditorBrowsableState.Never)]
public Type GetType()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
[EditorBrowsableAttribute(EditorBrowsableState::Never)]
public:
Type^ GetType()
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
member GetType : unit -> Type
public function GetType() : Type

Return Value

Type: System.Type
The type for the current DbContext.

See Also

Reference

DbContext Class

System.Data.Entity Namespace