EntityContainer.TryGetRelationshipSetByName 方法

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

使用关系集的指定名称返回一个 RelationshipSet 对象。

命名空间:  System.Data.Entity.Core.Metadata.Edm
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Function TryGetRelationshipSetByName ( _
    name As String, _
    ignoreCase As Boolean, _
    <OutAttribute> ByRef relationshipSet As RelationshipSet _
) As Boolean
用法
Dim instance As EntityContainer 
Dim name As String 
Dim ignoreCase As Boolean 
Dim relationshipSet As RelationshipSet 
Dim returnValue As Boolean 

returnValue = instance.TryGetRelationshipSetByName(name, _
    ignoreCase, relationshipSet)
public bool TryGetRelationshipSetByName(
    string name,
    bool ignoreCase,
    out RelationshipSet relationshipSet
)
public:
bool TryGetRelationshipSetByName(
    String^ name, 
    bool ignoreCase, 
    [OutAttribute] RelationshipSet^% relationshipSet
)
member TryGetRelationshipSetByName : 
        name:string * 
        ignoreCase:bool * 
        relationshipSet:RelationshipSet byref -> bool
public function TryGetRelationshipSetByName(
    name : String, 
    ignoreCase : boolean, 
    relationshipSet : RelationshipSet
) : boolean

参数

  • ignoreCase
    类型:System.Boolean
    如果执行不区分大小写的搜索,则为 true;否则为 false。

返回值

类型:System.Boolean
如果存在与搜索条件匹配的关系集,则为 true;否则为 false。

请参阅

参考

EntityContainer 类

System.Data.Entity.Core.Metadata.Edm 命名空间