RelatedEnd.Load Method

 

Loads the related entity or entities into the local related end using the default merge option.

Namespace:   System.Data.Entity.Core.Objects.DataClasses
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodLoad()

Loads the related object or objects into the related end with the default merge option.

System_CAPS_pubmethodLoad(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.

public void Load()

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.

public abstract void Load(
	MergeOption mergeOption
)

Parameters

mergeOption
Type: System.Data.Entity.Core.Objects.MergeOption

The MergeOption to use when merging objects into an existing EntityCollection<TEntity>.

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.