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
参数
- name
类型:System.String
要搜索的关系集的名称。
- ignoreCase
类型:System.Boolean
如果执行不区分大小写的搜索,则为 true;否则为 false。
- relationshipSet
类型:System.Data.Entity.Core.Metadata.Edm.RelationshipSet%
在此方法返回时,包含一个 RelationshipSet 对象。
返回值
类型:System.Boolean
如果存在与搜索条件匹配的关系集,则为 true;否则为 false。