EntityRef<TEntity> 結構

定義

提供延後載入與關聯性維護,以用於 LINQ to SQL 應用程式中一對多關聯性的單一端。

generic <typename TEntity>
 where TEntity : classpublic value class EntityRef
public struct EntityRef<TEntity> where TEntity : class
type EntityRef<'Entity (requires 'Entity : null)> = struct
Public Structure EntityRef(Of TEntity)

類型參數

TEntity

目標實體的型別。

繼承
EntityRef<TEntity>

備註

這個類別會與搭配 EntitySet<TEntity>使用。

建構函式

EntityRef<TEntity>(EntityRef<TEntity>)

參考目標實體以初始化 EntityRef<TEntity> 類別的新執行個體。

EntityRef<TEntity>(IEnumerable<TEntity>)

指定來源以初始化 EntityRef<TEntity> 類別的新執行個體。

EntityRef<TEntity>(TEntity)

指定目標實體以初始化 EntityRef<TEntity> 類別的新執行個體。

屬性

Entity

取得或設定目標實體。

HasLoadedOrAssignedValue

取得值,這個值指出是否已經載入或指派目標。

適用於