EntityType.Create Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() ![]() | 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. |
EntityType.Create Method (String, String, DataSpace, EntityType, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>)
The factory method for constructing the EntityType object.
public static EntityType Create( string name, string namespaceName, DataSpace dataSpace, EntityType baseType, IEnumerable<string> keyMemberNames, IEnumerable<EdmMember> members, IEnumerable<MetadataProperty> metadataProperties )
Parameters
- name
-
Type:
System.String
The name of the entity type.
- namespaceName
-
Type:
System.String
The namespace of the entity type.
- dataSpace
-
Type:
System.Data.Entity.Core.Metadata.Edm.DataSpace
The dataspace in which the EntityType belongs to.
- baseType
-
Type:
System.Data.Entity.Core.Metadata.Edm.EntityType
The base type.
- keyMemberNames
-
Type:
System.Collections.Generic.IEnumerable<String>
Name of key members for the type.
- members
-
Type:
System.Collections.Generic.IEnumerable<EdmMember>
Members of the entity type (primitive and navigation properties).
- metadataProperties
-
Type:
System.Collections.Generic.IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Exception | Condition |
---|---|
ArgumentException | Thrown if either name, namespace arguments are null. |
The newly created EntityType will be read only.
EntityType.Create Method (String, String, DataSpace, IEnumerable<String>, IEnumerable<EdmMember>, IEnumerable<MetadataProperty>)
The factory method for constructing the EntityType object.
public static EntityType Create( string name, string namespaceName, DataSpace dataSpace, IEnumerable<string> keyMemberNames, IEnumerable<EdmMember> members, IEnumerable<MetadataProperty> metadataProperties )
Parameters
- name
-
Type:
System.String
The name of the entity type.
- namespaceName
-
Type:
System.String
The namespace of the entity type.
- dataSpace
-
Type:
System.Data.Entity.Core.Metadata.Edm.DataSpace
The dataspace in which the EntityType belongs to.
- keyMemberNames
-
Type:
System.Collections.Generic.IEnumerable<String>
Name of key members for the type.
- members
-
Type:
System.Collections.Generic.IEnumerable<EdmMember>
Members of the entity type (primitive and navigation properties).
- metadataProperties
-
Type:
System.Collections.Generic.IEnumerable<MetadataProperty>
Metadata properties to be associated with the instance.
Exception | Condition |
---|---|
ArgumentException | Thrown if either name, namespace arguments are null. |
The newly created EntityType will be read only.