Table of Contents

Class EntityValidation

Namespace
The.Entities.Validation
Assembly
Instagile.dll

Programmatic entity validation. A run evaluates, for each entity in the owned graph: checks derived from model metadata (required, date bounds, maximum length), then the entity's Validate and ValidateAsync overrides. Entities which report themselves as derived are exempt - see IsValidated(EntityKernel). Validation is not automatic; callers (UI sessions, commands, services) initiate validation and decide how to interpret the report.

public static class EntityValidation
Inheritance
EntityValidation
Inherited Members

Methods

ValidateAsync(IEntity, ValidationIntent?, CancellationToken?)

Validates the graph rooted at this entity: the entity itself plus the entities of its owned (Value) relationships, loading them if necessary. Lookup relationships are not traversed, and entities marked for deletion or reporting themselves as derived are skipped.

public static Task<ValidationReport> ValidateAsync(this IEntity entity, ValidationIntent? intent = null, CancellationToken? cancellationToken = null)

Parameters

entity IEntity
intent ValidationIntent?
cancellationToken CancellationToken?

Returns

Task<ValidationReport>