Share via


EntityEntry<TEntity>.Reference Method

Definition

Overloads

Reference<TProperty>(INavigationBase)

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation that associates this entity to another entity.

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

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation property that associates this entity to another entity.

Reference<TProperty>(String)

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation that associates this entity to another entity.

Reference<TProperty>(INavigationBase)

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation that associates this entity to another entity.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<TEntity,TProperty> Reference<TProperty> (Microsoft.EntityFrameworkCore.Metadata.INavigationBase navigation) where TProperty : class;
override this.Reference : Microsoft.EntityFrameworkCore.Metadata.INavigationBase -> Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Reference(Of TProperty As Class) (navigation As INavigationBase) As ReferenceEntry(Of TEntity, TProperty)

Type Parameters

TProperty

Parameters

navigation
INavigationBase

The reference navigation.

Returns

An object that exposes change tracking information and operations for the given navigation property.

Remarks

See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.

Applies to

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

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation property that associates this entity to another entity.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<TEntity,TProperty> Reference<TProperty> (System.Linq.Expressions.Expression<Func<TEntity,TProperty>> propertyExpression) where TProperty : class;
public virtual Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<TEntity,TProperty> Reference<TProperty> (System.Linq.Expressions.Expression<Func<TEntity,TProperty?>> propertyExpression) where TProperty : class;
override this.Reference : System.Linq.Expressions.Expression<Func<'Entity, 'Property>> -> Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Reference(Of TProperty As Class) (propertyExpression As Expression(Of Func(Of TEntity, TProperty))) As ReferenceEntry(Of TEntity, TProperty)

Type Parameters

TProperty

Parameters

propertyExpression
Expression<Func<TEntity,TProperty>>

A lambda expression representing the reference navigation to access information and operations for.

Returns

An object that exposes change tracking information and operations for the given navigation property.

Remarks

See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.

Applies to

Reference<TProperty>(String)

Provides access to change tracking and loading information for a reference (i.e. non-collection) navigation that associates this entity to another entity.

public virtual Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<TEntity,TProperty> Reference<TProperty> (string propertyName) where TProperty : class;
override this.Reference : string -> Microsoft.EntityFrameworkCore.ChangeTracking.ReferenceEntry<'Entity, 'Property (requires 'Entity : null and 'Property : null)> (requires 'Property : null)
Public Overridable Function Reference(Of TProperty As Class) (propertyName As String) As ReferenceEntry(Of TEntity, TProperty)

Type Parameters

TProperty

Parameters

propertyName
String

The name of the navigation property.

Returns

An object that exposes change tracking information and operations for the given navigation property.

Remarks

See Accessing tracked entities in EF Core and Changing foreign keys and navigations for more information and examples.

Applies to