DbEntityEntry<TEntity>.Reference Method

 

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

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

NameDescription
System_CAPS_pubmethodReference(String)

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

System_CAPS_pubmethodReference<TProperty>(Expression<Func<TEntity, TProperty>>)

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

System_CAPS_pubmethodReference<TProperty>(String)

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


DbEntityEntry<TEntity>.Reference Method (String)

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

public DbReferenceEntry Reference(
	string navigationProperty
)

Parameters

navigationProperty
Type: System.String

The name of the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbReferenceEntry

An object representing the navigation property.


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

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

[SuppressMessageAttribute("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures")]
public DbReferenceEntry<TEntity, TProperty> Reference<TProperty>(
	Expression<Func<TEntity, TProperty>> navigationProperty
)
where TProperty : class

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.

Type Parameters

TProperty

The type of the property.


DbEntityEntry<TEntity>.Reference<TProperty> Method (String)

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

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

Parameters

navigationProperty
Type: System.String

The name of the navigation property.

Return Value

Type: System.Data.Entity.Infrastructure.DbReferenceEntry<TEntity, TProperty>

An object representing the navigation property.

Type Parameters

TProperty

The type of the property.