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