MetadataWorkspaceExtensions.GetAllAssociationSets 方法

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

检索此 ItemCollection 中所有 AssociationSet 元素的可枚举集合

命名空间:  Microsoft.Data.Entity.Design.DatabaseGeneration
程序集:  Microsoft.Data.Entity.Design.DatabaseGeneration(在 Microsoft.Data.Entity.Design.DatabaseGeneration.dll 中)

语法

声明
<ExtensionAttribute> _
Public Shared Function GetAllAssociationSets ( _
    itemCollection As ItemCollection _
) As IEnumerable(Of AssociationSet)
用法
Dim itemCollection As ItemCollection 
Dim returnValue As IEnumerable(Of AssociationSet)

returnValue = itemCollection.GetAllAssociationSets()
public static IEnumerable<AssociationSet> GetAllAssociationSets(
    this ItemCollection itemCollection
)
[ExtensionAttribute]
public:
static IEnumerable<AssociationSet^>^ GetAllAssociationSets(
    ItemCollection^ itemCollection
)
static member GetAllAssociationSets : 
        itemCollection:ItemCollection -> IEnumerable<AssociationSet> 
public static function GetAllAssociationSets(
    itemCollection : ItemCollection
) : IEnumerable<AssociationSet>

参数

返回值

类型:System.Collections.Generic.IEnumerable<AssociationSet>
AssociationSet 元素的列表。

使用说明

在 Visual Basic 和 C# 中,可以在 ItemCollection 类型的任何对象上将此方法作为实例方法来调用。当使用实例方法语法调用此方法时,请省略第一个参数。有关详细信息,请参阅https://msdn.microsoft.com/zh-cn/library/bb384936(v=vs.113)https://msdn.microsoft.com/zh-cn/library/bb383977(v=vs.113)

请参阅

参考

MetadataWorkspaceExtensions 类

Microsoft.Data.Entity.Design.DatabaseGeneration 命名空间