EntityRef<TEntity> 结构

定义

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

注解

此类与结合使用 EntitySet<TEntity>This class is used in combination with EntitySet<TEntity>.

构造函数

EntityRef<TEntity>(EntityRef<TEntity>)

通过引用目标实体初始化 EntityRef<TEntity> 类的新实例。Initializes a new instance of the EntityRef<TEntity> class by referencing the target entity.

EntityRef<TEntity>(IEnumerable<TEntity>)

通过指定源初始化 EntityRef<TEntity> 类的新实例。Initializes a new instance of the EntityRef<TEntity> class by specifying the source.

EntityRef<TEntity>(TEntity)

通过指定目标实体初始化 EntityRef<TEntity> 类的新实例。Initializes a new instance of the EntityRef<TEntity> class by specifying the target entity.

属性

Entity

获取或设置目标实体。Gets or sets the target entity.

HasLoadedOrAssignedValue

获取一个值,该值指示是否已加载或分配目标。Gets a value that indicates whether the target has been loaded or assigned.

适用于