src/Misc/EFTools/EntityDesignDatabaseGeneration/MetadataWorkspaceExtensions.cs
/// <summary>
///     Retrieves an enumerable collection of all EntitySet elements in this ItemCollection
/// </summary>
/// <param name="itemCollection">The ItemCollection.</param>
/// <returns>The list of EntitySet elements.</returns>
Retrieves an enumerable collection of all EntitySet elements in this ItemCollection
Retrieves an enumerable collection of all EntitySet elements in this ItemCollection
public static IEnumerable<EntitySet> GetAllEntitySets(this ItemCollection itemCollection)
        {
            var allEntitySets = new List<EntitySet>();
            var edmContainer = itemCollection.GetItems<EntityContainer>().FirstOrDefault();
            if (edmContainer != null)
            {
                allEntitySets.AddRange(edmContainer.BaseEntitySets.OfType<EntitySet>());
            }
            return allEntitySets;
        }
public static IEnumerable < EntitySet > GetAllEntitySets ( this ItemCollection itemCollection ) { var allEntitySets = new List < EntitySet > ( ) ; var edmContainer = itemCollection . GetItems < EntityContainer > ( ) . FirstOrDefault ( ) ; if ( edmContainer != null ) { allEntitySets . AddRange ( edmContainer . BaseEntitySets . OfType < EntitySet > ( ) ) ; } return allEntitySets ; }
Retrieves an enumerable collection of all EntitySet elements in this ItemCollection
Retrieves an enumerable collection of all EntitySet elements in this ItemCollection
The list of EntitySet elements.
The list of EntitySet elements .
ItemCollection
this
itemCollection
None