EntityType.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.
Overloads
Create(String, String, DataSpace, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>) |
The factory method for constructing the EntityType object. |
Create(String, String, DataSpace, EntityType, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>) |
The factory method for constructing the EntityType object. |
Create(String, String, DataSpace, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>)
The factory method for constructing the EntityType object.
public static System.Data.Entity.Core.Metadata.Edm.EntityType Create (string name, string namespaceName, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace, System.Collections.Generic.IEnumerable<string> keyMemberNames, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.EdmMember> members, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * string * System.Data.Entity.Core.Metadata.Edm.DataSpace * seq<string> * seq<System.Data.Entity.Core.Metadata.Edm.EdmMember> * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.EntityType
Parameters
- name
- String
The name of the entity type.
- namespaceName
- String
The namespace of the entity type.
- dataSpace
- DataSpace
The dataspace in which the EntityType belongs to.
- keyMemberNames
- IEnumerable<String>
Name of key members for the type.
- members
- IEnumerable<EdmMember>
Members of the entity type (primitive and navigation properties).
- metadataProperties
- IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Returns
The EntityType object.
Exceptions
Thrown if either name, namespace arguments are null.
Remarks
The newly created EntityType will be read only.
Applies to
Create(String, String, DataSpace, EntityType, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>)
The factory method for constructing the EntityType object.
public static System.Data.Entity.Core.Metadata.Edm.EntityType Create (string name, string namespaceName, System.Data.Entity.Core.Metadata.Edm.DataSpace dataSpace, System.Data.Entity.Core.Metadata.Edm.EntityType baseType, System.Collections.Generic.IEnumerable<string> keyMemberNames, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.EdmMember> members, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * string * System.Data.Entity.Core.Metadata.Edm.DataSpace * System.Data.Entity.Core.Metadata.Edm.EntityType * seq<string> * seq<System.Data.Entity.Core.Metadata.Edm.EdmMember> * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.EntityType
Parameters
- name
- String
The name of the entity type.
- namespaceName
- String
The namespace of the entity type.
- dataSpace
- DataSpace
The dataspace in which the EntityType belongs to.
- baseType
- EntityType
The base type.
- keyMemberNames
- IEnumerable<String>
Name of key members for the type.
- members
- IEnumerable<EdmMember>
Members of the entity type (primitive and navigation properties).
- metadataProperties
- IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Returns
The EntityType object.
Exceptions
Thrown if either name, namespace arguments are null.
Remarks
The newly created EntityType will be read only.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for