src/Misc/EFTools/EntityDesignDatabaseGeneration/MetadataWorkspaceExtensions.cs
/// <summary>
///     Returns this EntityType if it has no base type. Otherwise, returns the top-most base type.
/// </summary>
/// <param name="entityType">The EntityType.</param>
/// <returns>The top-most base type.</returns>
Returns this EntityType if it has no base type. Otherwise, returns the top-most base type.
Returns this EntityType if it has no base type . Otherwise returns the top - most base type .
public static EntityType GetRootOrSelf(this EntityType entityType)
        {
            var baseType = entityType;
            while (baseType.BaseType != null)
            {
                baseType = baseType.BaseType as EntityType;
            }
            return baseType;
        }
public static EntityType GetRootOrSelf ( this EntityType entityType ) { var baseType = entityType ; while ( baseType . BaseType != null ) { baseType = baseType . BaseType as EntityType ; } return baseType ; }
Returns this EntityType if it has no base type.
Returns this EntityType if it has no base type .
The top-most base type.
The top - most base type .
EntityType
this
entityType
None