DbEntityEntry<TEntity>.Reference<TProperty> Method (Expression<Func<TEntity, TProperty>>)

Entity Framework 5.0

Gets an object that represents the reference (i.e. non-collection) navigation property from this entity to another entity.

Namespace:  System.Data.Entity.Infrastructure
Assembly:  EntityFramework (in EntityFramework.dll)

public DbReferenceEntry<TEntity, TProperty> Reference<TProperty>(
	Expression<Func<TEntity, TProperty>> navigationProperty
)
where TProperty : class

Type Parameters

TProperty

The type of the property.

Parameters

navigationProperty
Type: System.Linq.Expressions.Expression<Func<TEntity, TProperty>>

An expression representing the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbReferenceEntry<TEntity, TProperty>
An object representing the navigation property.
Show: