Edit

Share via


EntityRef<TEntity> Struct

Definition

Provides for deferred loading and relationship maintenance for the singleton side of a one-to-many relationship in a LINQ to SQL application.

C#
public struct EntityRef<TEntity> where TEntity : class

Type Parameters

TEntity

The type of the target entity.

Inheritance
EntityRef<TEntity>

Remarks

This class is used in combination with EntitySet<TEntity>.

Constructors

EntityRef<TEntity>(EntityRef<TEntity>)

Initializes a new instance of the EntityRef<TEntity> class by referencing the target entity.

EntityRef<TEntity>(IEnumerable<TEntity>)

Initializes a new instance of the EntityRef<TEntity> class by specifying the source.

EntityRef<TEntity>(TEntity)

Initializes a new instance of the EntityRef<TEntity> class by specifying the target entity.

Properties

Entity

Gets or sets the target entity.

HasLoadedOrAssignedValue

Gets a value that indicates whether the target has been loaded or assigned.

Applies to

Product Versions
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1