EntityRef<TEntity> EntityRef<TEntity> EntityRef<TEntity> EntityRef<TEntity> Struct

定義

提供延後載入與關聯性維護,以用於 LINQ to SQL 應用程式中一對多關聯性的單一端。Provides for deferred loading and relationship maintenance for the singleton side of a one-to-many relationship in a LINQ to SQL application.

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

目標實體的型別。The type of the target entity.

繼承
EntityRef<TEntity>EntityRef<TEntity>EntityRef<TEntity>EntityRef<TEntity>

備註

這個類別會與EntitySet<TEntity>搭配使用。This class is used in combination with EntitySet<TEntity>.

建構函式

EntityRef<TEntity>(IEnumerable<TEntity>) EntityRef<TEntity>(IEnumerable<TEntity>) EntityRef<TEntity>(IEnumerable<TEntity>) EntityRef<TEntity>(IEnumerable<TEntity>)

指定來源以初始化 EntityRef<TEntity> 類別的新執行個體。Initializes a new instance of the EntityRef<TEntity> class by specifying the source.

EntityRef<TEntity>(EntityRef<TEntity>) EntityRef<TEntity>(EntityRef<TEntity>) EntityRef<TEntity>(EntityRef<TEntity>) EntityRef<TEntity>(EntityRef<TEntity>)

參考目標實體以初始化 EntityRef<TEntity> 類別的新執行個體。Initializes a new instance of the EntityRef<TEntity> class by referencing the target entity.

EntityRef<TEntity>(TEntity) EntityRef<TEntity>(TEntity) EntityRef<TEntity>(TEntity) EntityRef<TEntity>(TEntity)

指定目標實體以初始化 EntityRef<TEntity> 類別的新執行個體。Initializes a new instance of the EntityRef<TEntity> class by specifying the target entity.

屬性

Entity Entity Entity Entity

取得或設定目標實體。Gets or sets the target entity.

HasLoadedOrAssignedValue HasLoadedOrAssignedValue HasLoadedOrAssignedValue HasLoadedOrAssignedValue

取得值,這個值指出是否已經載入或指派目標。Gets a value that indicates whether the target has been loaded or assigned.

適用於