MetadataWorkspaceExtensions.GetAllAssociations 方法
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
检索此 ItemCollection 中所有 AssociationType 元素的可枚举集合
命名空间: Microsoft.Data.Entity.Design.DatabaseGeneration
程序集: Microsoft.Data.Entity.Design.DatabaseGeneration(在 Microsoft.Data.Entity.Design.DatabaseGeneration.dll 中)
语法
声明
<ExtensionAttribute> _
Public Shared Function GetAllAssociations ( _
itemCollection As ItemCollection _
) As IEnumerable(Of AssociationType)
用法
Dim itemCollection As ItemCollection
Dim returnValue As IEnumerable(Of AssociationType)
returnValue = itemCollection.GetAllAssociations()
public static IEnumerable<AssociationType> GetAllAssociations(
this ItemCollection itemCollection
)
[ExtensionAttribute]
public:
static IEnumerable<AssociationType^>^ GetAllAssociations(
ItemCollection^ itemCollection
)
static member GetAllAssociations :
itemCollection:ItemCollection -> IEnumerable<AssociationType>
public static function GetAllAssociations(
itemCollection : ItemCollection
) : IEnumerable<AssociationType>
参数
- itemCollection
类型:System.Data.Entity.Core.Metadata.Edm.ItemCollection
ItemCollection。
返回值
类型:System.Collections.Generic.IEnumerable<AssociationType>
AssociationType 元素的列表。
使用说明
在 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)。