src/Misc/EFTools/EntityDesignDatabaseGeneration/MetadataWorkspaceExtensions.cs
/// <summary>
///     Retrieves the 'Name' attribute of the &lt;EntityContainer/&gt; element in this ItemCollection.
/// </summary>
/// <param name="itemCollection">The ItemCollection.</param>
/// <returns>The name of the entity container.</returns>
/// <exception cref="InvalidDataException">if an EntityContainer element cannot be found</exception>
Retrieves the 'Name' attribute of the  element in this ItemCollection.
Retrieves the ' Name ' attribute of the element in this ItemCollection .
public static string GetEntityContainerName(this ItemCollection itemCollection)
        {
            var entityContainer = itemCollection.GetItems<EntityContainer>().FirstOrDefault();
            if (entityContainer == null)
            {
                throw new InvalidDataException(Resources.ErrorNoEntityContainer);
            }
            return entityContainer.Name;
        }
public static string GetEntityContainerName ( this ItemCollection itemCollection ) { var entityContainer = itemCollection . GetItems < EntityContainer > ( ) . FirstOrDefault ( ) ; if ( entityContainer == null ) { throw new InvalidDataException ( Resources . ErrorNoEntityContainer ) ; } return entityContainer . Name ; }
Retrieves the 'Name' attribute of the <EntityContainer/> element in this ItemCollection.
Retrieves the ' Name ' attribute of the <EntityContainer / > element in this ItemCollection .
The name of the entity container.
The name of the entity container .
if an EntityContainer element cannot be found
if an EntityContainer element cannot be found
ItemCollection
this
itemCollection
None