DbEntityEntry<TEntity>.Reference Method
Gets an object that represents the reference (for example, non-collection) navigation property from this entity to another entity.
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | Reference(String) | Gets an object that represents the reference (i.e. non-collection) navigation property from this entity to another entity. |
![]() | Reference<TProperty>(Expression<Func<TEntity, TProperty>>) | Gets an object that represents the reference (i.e. non-collection) navigation property from this entity to another entity. |
![]() | Reference<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.
Parameters
- navigationProperty
-
Type:
System.String
The name of the navigation property.
Return Value
Type: System.Data.Entity.Infrastructure.DbReferenceEntryAn 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.