ObjectStateManager.TryGetRelationshipManager 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
傳回指定物件所使用的 RelationshipManager。
命名空間: System.Data.Entity.Core.Objects
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
Public Overridable Function TryGetRelationshipManager ( _
entity As Object, _
<OutAttribute> ByRef relationshipManager As RelationshipManager _
) As Boolean
'用途
Dim instance As ObjectStateManager
Dim entity As Object
Dim relationshipManager As RelationshipManager
Dim returnValue As Boolean
returnValue = instance.TryGetRelationshipManager(entity, _
relationshipManager)
public virtual bool TryGetRelationshipManager(
Object entity,
out RelationshipManager relationshipManager
)
public:
virtual bool TryGetRelationshipManager(
Object^ entity,
[OutAttribute] RelationshipManager^% relationshipManager
)
abstract TryGetRelationshipManager :
entity:Object *
relationshipManager:RelationshipManager byref -> bool
override TryGetRelationshipManager :
entity:Object *
relationshipManager:RelationshipManager byref -> bool
public function TryGetRelationshipManager(
entity : Object,
relationshipManager : RelationshipManager
) : boolean
參數
- entity
類型:System.Object
要為其傳回 RelationshipManager 的物件。
- relationshipManager
類型:System.Data.Entity.Core.Objects.DataClasses.RelationshipManager%
當此方法傳回時,會包含實體的 RelationshipManager。
傳回值
類型:System.Boolean
如果已為所提供的實體傳回 RelationshipManager 執行個體則為 true,否則為 false。