EntityContainer.Create Method
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.
The factory method for constructing the EntityContainer object.
public static System.Data.Entity.Core.Metadata.Edm.EntityContainer Create (string name, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.EntitySetBase> entitySets, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.EdmFunction> functionImports, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * System.Data.Entity.Core.Metadata.Edm.DataSpace * seq<System.Data.Entity.Core.Metadata.Edm.EntitySetBase> * seq<System.Data.Entity.Core.Metadata.Edm.EdmFunction> * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.EntityContainer
Parameters
- name
- String
The name of the entity container to be created.
- dataSpace
- DataSpace
DataSpace in which this entity container belongs to.
- entitySets
- IEnumerable<EntitySetBase>
Entity sets that will be included in the new container. Can be null.
- functionImports
- IEnumerable<EdmFunction>
Functions that will be included in the new container. Can be null.
- metadataProperties
- IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Returns
The EntityContainer object.
Exceptions
Thrown if the name argument is null or empty string.
Remarks
The newly created EntityContainer will be read only.
Applies to
Entity Framework