次の方法で共有


EntitySet.Create メソッド

[このページは、Entity Framework 6 に関するページです。最新バージョンは、'Entity Framework' NuGet パッケージとして入手できます。Entity Framework の詳細については、msdn.com/data/ef を参照してください。]

EntitySet オブジェクトを作成するためのファクトリ メソッド。

名前空間:  System.Data.Entity.Core.Metadata.Edm
アセンブリ:  EntityFramework (EntityFramework.dll 内)

構文

'宣言
Public Shared Function Create ( _
    name As String, _
    schema As String, _
    table As String, _
    definingQuery As String, _
    entityType As EntityType, _
    metadataProperties As IEnumerable(Of MetadataProperty) _
) As EntitySet
'使用
Dim name As String 
Dim schema As String 
Dim table As String 
Dim definingQuery As String 
Dim entityType As EntityType 
Dim metadataProperties As IEnumerable(Of MetadataProperty)
Dim returnValue As EntitySet 

returnValue = EntitySet.Create(name, schema, _
    table, definingQuery, entityType, _
    metadataProperties)
public static EntitySet Create(
    string name,
    string schema,
    string table,
    string definingQuery,
    EntityType entityType,
    IEnumerable<MetadataProperty> metadataProperties
)
public:
static EntitySet^ Create(
    String^ name, 
    String^ schema, 
    String^ table, 
    String^ definingQuery, 
    EntityType^ entityType, 
    IEnumerable<MetadataProperty^>^ metadataProperties
)
static member Create : 
        name:string * 
        schema:string * 
        table:string * 
        definingQuery:string * 
        entityType:EntityType * 
        metadataProperties:IEnumerable<MetadataProperty> -> EntitySet
public static function Create(
    name : String, 
    schema : String, 
    table : String, 
    definingQuery : String, 
    entityType : EntityType, 
    metadataProperties : IEnumerable<MetadataProperty>
) : EntitySet

パラメーター

  • schema
    型 : System.String
    db スキーマ。 null を使用できます。
  • table
    型 : System.String
    db テーブル。 null を使用できます。
  • definingQuery
    型 : System.String
    この EntitySet のデータを取得するために使用する必要があるプロバイダー固有のクエリ。 null を使用できます。

戻り値

型 : System.Data.Entity.Core.Metadata.Edm.EntitySet
EntitySet オブジェクト。

例外

例外 状態
ArgumentException

name 引数が null または空文字列の場合にスローされます。

解説

新しく作成される EntitySet は読み取り専用になります。

参照

参照

EntitySet クラス

System.Data.Entity.Core.Metadata.Edm 名前空間