共用方式為


EntitySet.Create 方法

定義

建構 EntitySet 物件的 Factory 方法。

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

db 資料表。 可以是 null。

definingQuery
String

提供者特定的查詢,應該用來擷取此 EntitySet 的資料。 可以是 null。

entityType
EntityType

這個實體集類型包含之實體的實體類型。

metadataProperties
IEnumerable<MetadataProperty>

將新增至新建立 EntitySet 的中繼資料屬性。 可以是 null。

傳回

EntitySet 物件。

例外狀況

如果 name 引數為 Null 或空字串,則會擲回 。

備註

新建立的 EntitySet 將會是唯讀的。

適用於