src/EntityFramework/Infrastructure/EdmxReader.cs
/// <summary>
/// Reads a metadata model from .edmx.
/// </summary>
/// <param name="reader">XML reader for the .edmx</param>
/// <param name="defaultSchema">Default database schema used by the model.</param>
/// <returns>The loaded metadata model.</returns>
Reads a metadata model from .edmx.
Reads a metadata model from . edmx .
public static DbCompiledModel Read(XmlReader reader, string defaultSchema)
        {
            Check.NotNull(reader, "reader");
            var document = XDocument.Load(reader);
            DbProviderInfo providerInfo;
            var mappingItemCollection = document.GetStorageMappingItemCollection(out providerInfo);
            return new DbCompiledModel(
                CodeFirstCachedMetadataWorkspace.Create(mappingItemCollection, providerInfo),
                defaultSchema);
        }
public static DbCompiledModel Read ( XmlReader reader , string defaultSchema ) { Check . NotNull ( reader , " " ) ; var document = XDocument . Load ( reader ) ; DbProviderInfo providerInfo ; var mappingItemCollection = document . GetStorageMappingItemCollection ( out providerInfo ) ; return new DbCompiledModel ( CodeFirstCachedMetadataWorkspace . Create ( mappingItemCollection , providerInfo ) , defaultSchema ) ; }
Reads a metadata model from .edmx.
Reads a metadata model from . edmx .
The loaded metadata model.
The loaded metadata model .
reader
XmlReader
XML reader for the .edmx
XML reader for the . edmx
defaultSchema
string
Default database schema used by the model.
Default database schema used by the model .