RelatedEnd.Load Method
Loads the related entity or entities into the local related end using the default merge option.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | Load() | Loads the related object or objects into the related end with the default merge option. |
![]() | Load(MergeOption) | Loads an object or objects from the related end with the specified merge option. |
RelatedEnd.Load Method ()
Loads the related object or objects into the related end with the default merge option.
Exception | Condition |
---|---|
InvalidOperationException | When the source object was retrieved by using a NoTracking query and the MergeOption is not NoTracking or the related objects are already loaded or when the source object is not attached to the ObjectContext or when the source object is being tracked but is in the Added or Deleted state or the MergeOption used for Load is NoTracking. |
RelatedEnd.Load Method (MergeOption)
Loads an object or objects from the related end with the specified merge option.
Parameters
- mergeOption
-
Type:
System.Data.Entity.Core.Objects.MergeOption
The MergeOption to use when merging objects into an existing EntityCollection<TEntity>.
Implements
IRelatedEnd.Load(MergeOption)Exception | Condition |
---|---|
InvalidOperationException | When the source object was retrieved by using a NoTracking query and the MergeOption is not NoTracking or the related objects are already loaded or when the source object is not attached to the ObjectContext or when the source object is being tracked but is in the Added or Deleted state or the MergeOption used for Load is NoTracking. |