EntityReference<TEntity>.Load Method

 

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.(Inherited from RelatedEnd.)

System_CAPS_pubmethodLoad(MergeOption)

Loads the related object for this EntityReference<TEntity> with the specified merge option.(Overrides RelatedEnd.Load(MergeOption).)


EntityReference<TEntity>.Load Method (MergeOption)

Loads the related object for this EntityReference<TEntity> with the specified merge option.

public override void Load(
	MergeOption mergeOption
)

Parameters

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

Specifies how the object should be returned if it already exists in the ObjectContext .

Exception Condition
InvalidOperationException

The source of the EntityReference<TEntity> is null or a query returned more than one related end or a query returned zero related ends, and one related end was expected.