internal Table(string name, EdmEntityType entityType, Table baseTable, Schema schema) { _actualName = name; _entityType = entityType; _baseTable = baseTable; _schema = schema; _lazyDerivedTables = new Lazy<TableCollection>(GetDerivedTables); _lazyColumns = new Lazy<ColumnCollection>(GetColumns); _lazyAssociations = new Lazy<AssociationCollection>(GetAssociations); _lazyPrimaryKey = new Lazy<Key>(GetPrimaryKey); }
private IEnumerable<EdmEntityType> GetEntityTypeWithBaseTypes(EdmEntityType entityType) { if (entityType.BaseType == null) { yield return entityType; } else { var baseTypes = GetEntityTypeWithBaseTypes(entityType.BaseType); foreach (var baseType in baseTypes) { yield return baseType; } yield return entityType; } }