ObjectStateManager::GetRelationshipManager Method (Object^)
.NET Framework (current version)
Returns the RelationshipManager that is used by the specified object.
Assembly: System.Data.Entity (in System.Data.Entity.dll)
Parameters
- entity
-
Type:
System::Object^
The object for which to return the RelationshipManager.
Return Value
Type: System.Data.Objects.DataClasses::RelationshipManager^The RelationshipManager for the specified object.
| Exception | Condition |
|---|---|
| InvalidOperationException | When a RelationshipManager cannot be returned for the specified entity. |
Calling the GetRelationshipManager method is the same as calling the TryGetRelationshipManager method, except that this method raises an exception instead of returning false.
Call the TryGetRelationshipManager method to avoid handling the InvalidOperationException that occurs when a RelationshipManager cannot be returned for the supplied entity.
.NET Framework
Available since 4.0
Available since 4.0
Show: