src/Misc/EFTools/EntityDesignDatabaseGeneration/MetadataWorkspaceExtensions.cs
/// <summary>
///     Retrieve the table name for this EntitySet, stored in its MetadataProperties
/// </summary>
/// <param name="entitySet">The EntitySet.</param>
/// <returns>The table name.</returns>
Retrieve the table name for this EntitySet, stored in its MetadataProperties
Retrieve the table name for this EntitySet stored in its MetadataProperties
[SuppressMessage("Microsoft.Design", "CA1011:ConsiderPassingBaseTypesAsParameters")]
        public static string GetTableName(this EntitySet entitySet)
        {
            if (entitySet == null)
            {
                throw new ArgumentNullException("entitySet");
            }
            MetadataProperty tableProperty;
            if (entitySet.MetadataProperties.TryGetValue("Table", false, out tableProperty))
            {
                string tablePropertyValue = null;
                if (tableProperty != null
                    && tableProperty.Value != null
                    && ((tablePropertyValue = tableProperty.Value as string) != null)
                    && !String.IsNullOrEmpty(tablePropertyValue))
                {
                    return tablePropertyValue;
                }
            }
            return entitySet.Name;
        }
[ SuppressMessage ( " " , " " ) ] public static string GetTableName ( this EntitySet entitySet ) { if ( entitySet == null ) { throw new ArgumentNullException ( " " ) ; } MetadataProperty tableProperty ; if ( entitySet . MetadataProperties . TryGetValue ( " " , false , out tableProperty ) ) { string tablePropertyValue = null ; if ( tableProperty != null && tableProperty . Value != null && ( ( tablePropertyValue = tableProperty . Value as string ) != null ) && ! String . IsNullOrEmpty ( tablePropertyValue ) ) { return tablePropertyValue ; } } return entitySet . Name ; }
Retrieve the table name for this EntitySet, stored in its MetadataProperties
Retrieve the table name for this EntitySet stored in its MetadataProperties
The table name.
The table name .
EntitySet
this
entitySet
None