MetadataWorkspace Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
MetadataWorkspace() |
Initializes a new instance of the MetadataWorkspace class. |
MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>) |
Initializes a new instance of the MetadataWorkspace class using the specified paths and assemblies. |
MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>) |
Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) that come from traditional EDMX mapping. Default o-space and o/c mapping collections will be used. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception. |
MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>, Func<ObjectItemCollection>) |
Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) needed by EF except the o/c mapping which will be created automatically based on the given o-space and c-space loaders. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception. |
MetadataWorkspace()
Initializes a new instance of the MetadataWorkspace class.
public MetadataWorkspace ();
Public Sub New ()
Applies to
MetadataWorkspace(IEnumerable<String>, IEnumerable<Assembly>)
Initializes a new instance of the MetadataWorkspace class using the specified paths and assemblies.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly")]
public MetadataWorkspace (System.Collections.Generic.IEnumerable<string> paths, System.Collections.Generic.IEnumerable<System.Reflection.Assembly> assembliesToConsider);
new System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace : seq<string> * seq<System.Reflection.Assembly> -> System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace
Public Sub New (paths As IEnumerable(Of String), assembliesToConsider As IEnumerable(Of Assembly))
Parameters
- paths
- IEnumerable<String>
The paths to workspace metadata.
- assembliesToConsider
- IEnumerable<Assembly>
The names of assemblies used to construct workspace.
- Attributes
Applies to
MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>)
Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) that come from traditional EDMX mapping. Default o-space and o/c mapping collections will be used. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="c")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="s")]
public MetadataWorkspace (Func<System.Data.Entity.Core.Metadata.Edm.EdmItemCollection> cSpaceLoader, Func<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> sSpaceLoader, Func<System.Data.Entity.Core.Mapping.StorageMappingItemCollection> csMappingLoader);
new System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace : Func<System.Data.Entity.Core.Metadata.Edm.EdmItemCollection> * Func<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> * Func<System.Data.Entity.Core.Mapping.StorageMappingItemCollection> -> System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace
Public Sub New (cSpaceLoader As Func(Of EdmItemCollection), sSpaceLoader As Func(Of StoreItemCollection), csMappingLoader As Func(Of StorageMappingItemCollection))
Parameters
- cSpaceLoader
- Func<EdmItemCollection>
Delegate to return the c-space (CSDL) item collection.
- sSpaceLoader
- Func<StoreItemCollection>
Delegate to return the s-space (SSDL) item collection.
- csMappingLoader
- Func<StorageMappingItemCollection>
Delegate to return the c/s mapping (MSL) item collection.
- Attributes
Applies to
MetadataWorkspace(Func<EdmItemCollection>, Func<StoreItemCollection>, Func<StorageMappingItemCollection>, Func<ObjectItemCollection>)
Constructs a MetadataWorkspace with loaders for all item collections (ItemCollection) needed by EF except the o/c mapping which will be created automatically based on the given o-space and c-space loaders. The item collection delegates are executed lazily when a given collection is used for the first time. It is acceptable to pass a delegate that returns null if the collection will never be used, but this is rarely done, and any attempt by EF to use the collection in such cases will result in an exception.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="s")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="o")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="c")]
public MetadataWorkspace (Func<System.Data.Entity.Core.Metadata.Edm.EdmItemCollection> cSpaceLoader, Func<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> sSpaceLoader, Func<System.Data.Entity.Core.Mapping.StorageMappingItemCollection> csMappingLoader, Func<System.Data.Entity.Core.Metadata.Edm.ObjectItemCollection> oSpaceLoader);
new System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace : Func<System.Data.Entity.Core.Metadata.Edm.EdmItemCollection> * Func<System.Data.Entity.Core.Metadata.Edm.StoreItemCollection> * Func<System.Data.Entity.Core.Mapping.StorageMappingItemCollection> * Func<System.Data.Entity.Core.Metadata.Edm.ObjectItemCollection> -> System.Data.Entity.Core.Metadata.Edm.MetadataWorkspace
Public Sub New (cSpaceLoader As Func(Of EdmItemCollection), sSpaceLoader As Func(Of StoreItemCollection), csMappingLoader As Func(Of StorageMappingItemCollection), oSpaceLoader As Func(Of ObjectItemCollection))
Parameters
- cSpaceLoader
- Func<EdmItemCollection>
Delegate to return the c-space (CSDL) item collection.
- sSpaceLoader
- Func<StoreItemCollection>
Delegate to return the s-space (SSDL) item collection.
- csMappingLoader
- Func<StorageMappingItemCollection>
Delegate to return the c/s mapping (MSL) item collection.
- oSpaceLoader
- Func<ObjectItemCollection>
Delegate to return the o-space item collection.
- Attributes
Applies to
Entity Framework