Share via


EntitySet.Create Method

Definition

The factory method for constructing the EntitySet object.

public static System.Data.Entity.Core.Metadata.Edm.EntitySet Create (string name, string schema, string table, string definingQuery, System.Data.Entity.Core.Metadata.Edm.EntityType entityType, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * string * string * string * System.Data.Entity.Core.Metadata.Edm.EntityType * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.EntitySet

Parameters

name
String

The name of the EntitySet.

schema
String

The db schema. Can be null.

table
String

The db table. Can be null.

definingQuery
String

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

entityType
EntityType

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

metadataProperties
IEnumerable<MetadataProperty>

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

Returns

The EntitySet object.

Exceptions

Thrown if the name argument is null or empty string.

Remarks

The newly created EntitySet will be read only.

Applies to