ObjectStateManager.GetRelationshipManager(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the RelationshipManager that is used by the specified object.
public:
System::Data::Objects::DataClasses::RelationshipManager ^ GetRelationshipManager(System::Object ^ entity);
public System.Data.Objects.DataClasses.RelationshipManager GetRelationshipManager(object entity);
member this.GetRelationshipManager : obj -> System.Data.Objects.DataClasses.RelationshipManager
Public Function GetRelationshipManager (entity As Object) As RelationshipManager
- entity
- Object
The object for which to return the RelationshipManager.
The RelationshipManager for the specified object.
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.
Applies to
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: