EntityEntry<TEntity>.Reference 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| Reference<TProperty>(INavigationBase) |
提供对引用(即非集合)导航的更改跟踪和加载信息的访问权限,该导航将此实体关联到另一个实体。 |
| Reference<TProperty>(Expression<Func<TEntity,TProperty>>) |
提供对引用(即非集合)导航属性的更改跟踪和加载信息的访问权限,该属性将此实体关联到另一个实体。 |
| Reference<TProperty>(String) |
提供对引用(即非集合)导航的更改跟踪和加载信息的访问权限,该导航将此实体关联到另一个实体。 |
Reference<TProperty>(INavigationBase)
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
提供对引用(即非集合)导航的更改跟踪和加载信息的访问权限,该导航将此实体关联到另一个实体。
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)
类型参数
- TProperty
参数
- navigation
- INavigationBase
引用导航。
返回
公开给定导航属性的更改跟踪信息和操作的对象。
注解
有关详细信息和示例,请参阅 EF Core 中的访问跟踪实体以及更改外键和导航。
适用于
Reference<TProperty>(Expression<Func<TEntity,TProperty>>)
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
提供对引用(即非集合)导航属性的更改跟踪和加载信息的访问权限,该属性将此实体关联到另一个实体。
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)
类型参数
- TProperty
参数
- propertyExpression
- Expression<Func<TEntity,TProperty>>
一个 lambda 表达式,表示用于访问其信息和操作的引用导航。
返回
公开给定导航属性的更改跟踪信息和操作的对象。
注解
有关详细信息和示例,请参阅 EF Core 中的访问跟踪实体以及更改外键和导航。
适用于
Reference<TProperty>(String)
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
- Source:
- EntityEntry`.cs
提供对引用(即非集合)导航的更改跟踪和加载信息的访问权限,该导航将此实体关联到另一个实体。
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)
类型参数
- TProperty
参数
- propertyName
- String
导航属性的名称。
返回
公开给定导航属性的更改跟踪信息和操作的对象。
注解
有关详细信息和示例,请参阅 EF Core 中的访问跟踪实体以及更改外键和导航。