Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
EntityEntry<TEntity>.Reference Method
Definition
- Namespace:
- Microsoft.EntityFrameworkCore.ChangeTracking
- Assembly:
- Microsoft.EntityFrameworkCore.dll
- Package:
- Microsoft.EntityFrameworkCore v10.0.0
- Package:
- Microsoft.EntityFrameworkCore v7.0.0
- Package:
- Microsoft.EntityFrameworkCore v8.0.0
- Package:
- Microsoft.EntityFrameworkCore v9.0.0
- Package:
- Microsoft.EntityFrameworkCore v1.1.6
- Package:
- Microsoft.EntityFrameworkCore v2.0.3
- Package:
- Microsoft.EntityFrameworkCore v2.1.11
- Package:
- Microsoft.EntityFrameworkCore v2.2.6
- Package:
- Microsoft.EntityFrameworkCore v3.0.0
- Package:
- Microsoft.EntityFrameworkCore v3.1.0
- Package:
- Microsoft.EntityFrameworkCore v5.0.0
- Package:
- Microsoft.EntityFrameworkCore v6.0.0
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| 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)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
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>>)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
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)
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
- Source:
- EntityEntry%60.cs
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
Entity Framework
Feedback
Was this page helpful?
