EntitySet.Create 方法

定义

用于构造 EntitySet 对象的工厂方法。

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

参数

name
String

EntitySet 的名称。

schema
String

数据库架构。 可以为 null。

table
String

数据库表。 可以为 null。

definingQuery
String

应用于检索此 EntitySet 的数据的提供程序特定查询。 可以为 null。

entityType
EntityType

此实体集类型包含的实体的实体类型。

metadataProperties
IEnumerable<MetadataProperty>

将添加到新创建的 EntitySet 的元数据属性。 可以为 null。

返回

EntitySet 对象。

例外

如果 name 参数为 null 或空字符串,则引发。

注解

新创建的 EntitySet 将是只读的。

适用于