Share via


EntityEntry<TEntity>.Reference 方法

定義

多載

Reference<TProperty>(INavigationBase)

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽。

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

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽屬性。

Reference<TProperty>(String)

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽。

Reference<TProperty>(INavigationBase)

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽。

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>>)

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽屬性。

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)

提供參考 (變更追蹤和載入資訊的存取權,也就是將這個實體關聯至另一個實體的非集合) 導覽。

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 中的追蹤實體變更外鍵和導覽

適用於