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