MetadataWorkspaceExtensions.GetRootOrSelf 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 this EntityType if it has no base type. Otherwise, returns the top-most base type.

Namespace:  Microsoft.Data.Entity.Design.DatabaseGeneration
Assembly:  Microsoft.Data.Entity.Design.DatabaseGeneration (in Microsoft.Data.Entity.Design.DatabaseGeneration.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function GetRootOrSelf ( _
    entityType As EntityType _
) As EntityType
'Usage
Dim entityType As EntityType 
Dim returnValue As EntityType 

returnValue = entityType.GetRootOrSelf()
public static EntityType GetRootOrSelf(
    this EntityType entityType
)
[ExtensionAttribute]
public:
static EntityType^ GetRootOrSelf(
    EntityType^ entityType
)
static member GetRootOrSelf : 
        entityType:EntityType -> EntityType
public static function GetRootOrSelf(
    entityType : EntityType
) : EntityType

Parameters

Return Value

Type: System.Data.Entity.Core.Metadata.Edm.EntityType
The top-most base type.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type EntityType. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.113) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.113).

See Also

Reference

MetadataWorkspaceExtensions Class

Microsoft.Data.Entity.Design.DatabaseGeneration Namespace