Table of Contents

Interface IEntityReference<T>

Namespace
The.Relationships
Assembly
Instagile.dll

The first step of an IEntityPath<T>, with a known ID.

public interface IEntityReference<T> : IEntityPath<T>, IEntityPath, ILazy<T?>, ILazy where T : IEntity

Type Parameters

T
Inherited Members

Properties

HasValue

Whether the foreign key is set. Distinct from IsPresent; never performs I/O.

[MemberNotNullWhen(true, "ID")]
bool HasValue { get; }

Property Value

bool

ID

Gets or sets the referenced entity by ID, without loading anything.

Guid? ID { get; set; }

Property Value

Guid?

Methods

Set(T?)

Sets the referenced identity by value.

void Set(T? value)

Parameters

value T

Remarks

Assignment is usually done by conversion (foo.Ref = bar); Set is implemented explicitly for internal consumers that don't have concrete entity types available.

Events

ValueChanged

Raised when the reference is changed to point at a different entity.

event EventHandler? ValueChanged

Event Type

EventHandler