src/Misc/EFTools/EntityDesignEntityDesigner/CustomCode/DomainClasses/EntityTypeBase.cs
/// <summary>
///     Recursively walks the base type hierarchy and returns properties that are keys.
///     Also checks for circular inheritance and throws an InvalidOperationException if found.
/// </summary>
/// <returns></returns>
Recursively walks the base type hierarchy and returns properties that are keys.
Also checks for circular inheritance and throws an InvalidOperationException if found.
Recursively walks the base type hierarchy and returns properties that are keys . Also checks for circular inheritance and throws an InvalidOperationException if found .
internal List<Property> GetKeyProperties()
        {
            var circularPath = String.Empty;
            if (HasCircularInheritance(out circularPath))
            {
                throw new InvalidOperationException(
                    String.Format(
                        CultureInfo.CurrentCulture,
                        DslResources.Error_CircularEntityInheritanceFound,
                        Name, circularPath));
            }
            var keyProperties = new List<Property>();
            if (BaseType != null)
            {
                keyProperties.AddRange(BaseType.GetKeyProperties());
            }
            else
            {
                keyProperties.AddRange(GetLocalKeyProperties());
            }
            return keyProperties;
        }
internal List < Property > GetKeyProperties ( ) { var circularPath = String . Empty ; if ( HasCircularInheritance ( out circularPath ) ) { throw new InvalidOperationException ( String . Format ( CultureInfo . CurrentCulture , DslResources . Error_CircularEntityInheritanceFound , Name , circularPath ) ) ; } var keyProperties = new List < Property > ( ) ; if ( BaseType != null ) { keyProperties . AddRange ( BaseType . GetKeyProperties ( ) ) ; } else { keyProperties . AddRange ( GetLocalKeyProperties ( ) ) ; } return keyProperties ; }
Recursively walks the base type hierarchy and returns properties that are keys.
Recursively walks the base type hierarchy and returns properties that are keys .
None