ObjectContext.LoadProperty ObjectContext.LoadProperty ObjectContext.LoadProperty Method

Definition

Overloads

LoadProperty(Object, String) LoadProperty(Object, String) LoadProperty(Object, String)

Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option.

LoadProperty(Object, String, MergeOption) LoadProperty(Object, String, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified navigation property and using the specified merge option.

LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the default merge option.

LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>, MergeOption) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the specified merge option.

LoadProperty(Object, String) LoadProperty(Object, String) LoadProperty(Object, String)

Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option.

public virtual void LoadProperty (object entity, string navigationProperty);
abstract member LoadProperty : obj * string -> unit
override this.LoadProperty : obj * string -> unit
Public Overridable Sub LoadProperty (entity As Object, navigationProperty As String)

Parameters

entity
Object Object Object

The entity for which related objects are to be loaded.

navigationProperty
String String String

The name of the navigation property that returns the related objects to be loaded.

Exceptions

The entity is in a Detached, System.Data.Entity.EntityState.Added, or Deleted state or the entity is attached to another instance of ObjectContext .

LoadProperty(Object, String, MergeOption) LoadProperty(Object, String, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified navigation property and using the specified merge option.

public virtual void LoadProperty (object entity, string navigationProperty, System.Data.Entity.Core.Objects.MergeOption mergeOption);
abstract member LoadProperty : obj * string * System.Data.Entity.Core.Objects.MergeOption -> unit
override this.LoadProperty : obj * string * System.Data.Entity.Core.Objects.MergeOption -> unit

Parameters

entity
Object Object Object

The entity for which related objects are to be loaded.

navigationProperty
String String String

The name of the navigation property that returns the related objects to be loaded.

mergeOption
MergeOption MergeOption MergeOption

The MergeOption value to use when you load the related objects.

Exceptions

The entity is in a Detached, System.Data.Entity.EntityState.Added, or Deleted state or the entity is attached to another instance of ObjectContext .

LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the default merge option.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public virtual void LoadProperty<TEntity> (TEntity entity, System.Linq.Expressions.Expression<Func<TEntity,object>> selector);
abstract member LoadProperty : 'Entity * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> unit
override this.LoadProperty : 'Entity * System.Linq.Expressions.Expression<Func<'Entity, obj>> -> unit
Public Overridable Sub LoadProperty(Of TEntity) (entity As TEntity, selector As Expression(Of Func(Of TEntity, Object)))

Type Parameters

TEntity

The type of the entity.

Parameters

entity
TEntity TEntity TEntity

The source object for which related objects are to be loaded.

selector
Expression<Func<TEntity,Object>>

A LINQ expression that defines the related objects to be loaded.

Exceptions

selector does not supply a valid input parameter.

The entity is in a Detached, System.Data.Entity.EntityState.Added, or Deleted state or the entity is attached to another instance of ObjectContext .

LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>, MergeOption) LoadProperty<TEntity>(TEntity, Expression<Func<TEntity,Object>>, MergeOption)

Explicitly loads an object that is related to the supplied object by the specified LINQ query and by using the specified merge option.

[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public virtual void LoadProperty<TEntity> (TEntity entity, System.Linq.Expressions.Expression<Func<TEntity,object>> selector, System.Data.Entity.Core.Objects.MergeOption mergeOption);
abstract member LoadProperty : 'Entity * System.Linq.Expressions.Expression<Func<'Entity, obj>> * System.Data.Entity.Core.Objects.MergeOption -> unit
override this.LoadProperty : 'Entity * System.Linq.Expressions.Expression<Func<'Entity, obj>> * System.Data.Entity.Core.Objects.MergeOption -> unit

Type Parameters

TEntity

The type of the entity.

Parameters

entity
TEntity TEntity TEntity

The source object for which related objects are to be loaded.

selector
Expression<Func<TEntity,Object>>

A LINQ expression that defines the related objects to be loaded.

mergeOption
MergeOption MergeOption MergeOption

The MergeOption value to use when you load the related objects.

Exceptions

selector does not supply a valid input parameter.

The entity is in a Detached, System.Data.Entity.EntityState.Added, or Deleted state or the entity is attached to another instance of ObjectContext .

Applies to