AssociationSet.Create 方法

定义

从指定的参数创建只读 AssociationSet 实例。

public static System.Data.Entity.Core.Metadata.Edm.AssociationSet Create(string name, System.Data.Entity.Core.Metadata.Edm.AssociationType type, System.Data.Entity.Core.Metadata.Edm.EntitySet sourceSet, System.Data.Entity.Core.Metadata.Edm.EntitySet targetSet, System.Collections.Generic.IEnumerable<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> metadataProperties);
static member Create : string * System.Data.Entity.Core.Metadata.Edm.AssociationType * System.Data.Entity.Core.Metadata.Edm.EntitySet * System.Data.Entity.Core.Metadata.Edm.EntitySet * seq<System.Data.Entity.Core.Metadata.Edm.MetadataProperty> -> System.Data.Entity.Core.Metadata.Edm.AssociationSet
Public Shared Function Create (name As String, type As AssociationType, sourceSet As EntitySet, targetSet As EntitySet, metadataProperties As IEnumerable(Of MetadataProperty)) As AssociationSet

参数

name
String

关联集的名称。

type
AssociationType

关联集中元素的关联类型。

sourceSet
EntitySet

源关联集结束的实体集。

targetSet
EntitySet

目标关联集结束的实体集。

metadataProperties
IEnumerable<MetadataProperty>

要与实例关联的元数据属性。

返回

新创建的 AssociationSet 实例。

例外

指定关联类型之一末尾的实体类型与相应实体集末尾的实体类型不匹配。

指定的关联类型为 null。

适用于