EntitySet.Create Method (String, String, String, String, EntityType, IEnumerable<MetadataProperty>)

 

The factory method for constructing the EntitySet object.

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

public static EntitySet Create(
	string name,
	string schema,
	string table,
	string definingQuery,
	EntityType entityType,
	IEnumerable<MetadataProperty> metadataProperties
)

Parameters

name
Type: System.String

The name of the EntitySet.

schema
Type: System.String

The db schema. Can be null.

table
Type: System.String

The db table. Can be null.

definingQuery
Type: System.String

The provider specific query that should be used to retrieve data for this EntitySet. Can be null.

entityType
Type: System.Data.Entity.Core.Metadata.Edm.EntityType

The entity type of the entities that this entity set type contains.

metadataProperties
Type: System.Collections.Generic.IEnumerable<MetadataProperty>

Metadata properties that will be added to the newly created EntitySet. Can be null.

Return Value

Type: System.Data.Entity.Core.Metadata.Edm.EntitySet

The EntitySet object.

Exception Condition
ArgumentException

Thrown if the name argument is null or empty string.

The newly created EntitySet will be read only.