MetadataWorkspace Constructor (IEnumerable(String), IEnumerable(Assembly))
Collapse the table of content
Expand the table of content

MetadataWorkspace Constructor (IEnumerable<String>, IEnumerable<Assembly>)

Initializes a new instance of the MetadataWorkspace class.

Namespace:  System.Data.Metadata.Edm
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public MetadataWorkspace(
	IEnumerable<string> paths,
	IEnumerable<Assembly> assembliesToConsider
)

Parameters

paths
Type: System.Collections.Generic.IEnumerable<String>
Paths to workspace metadata.
assembliesToConsider
Type: System.Collections.Generic.IEnumerable<Assembly>
Names of assemblies used to construct workspace.

You must use paths when specifying what to load, even when loading embedded resources from an assembly. For example:

  • To load the test.csdl embedded resource from the specified assembly:

    res://assemblyName/test.csdl
    
  • To load all .csdl, .msl, and .ssdl embedded resources from the specified assembly:

    res://assemblyName/
    
  • To load the test.csdl embedded resource from referenced or assembliesToConsider assemblies:

    res://*/test.csdl
    
  • To load all .csdl, .msl, and .ssdl embedded resources from the available assemblies:

    res://*/
    

The path to the workspace metadata follows the same rules as paths for embedded resources in the Entity Data Model connection string. See Connection Strings (Entity Framework) for more information.

.NET Framework

Supported in: 4, 3.5 SP1

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft