Table of Contents

Interface IListSpec

Namespace
The.Web.Entities
Assembly
Instagile.Web.Client.dll

Implement this interface and call AddSpecs(IServiceCollection, Assembly?) to customise list views.

public interface IListSpec

Remarks

Most implementations will inherit from DefaultListSpec<T>.

Methods

CreateLoadQuery(IEntityInfo, IEntityContext)

The query that supplies the list's rows: every row a list of this type could show. Hosts filter it (search criteria, reminders), and the list machinery orders, pages and preloads it.

IEntityQuery<IEntity> CreateLoadQuery(IEntityInfo metadata, IEntityContext context)

Parameters

metadata IEntityInfo
context IEntityContext

Returns

IEntityQuery<IEntity>

DefineColumns(IEntityInfo)

IEnumerable<ColumnSpec> DefineColumns(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IEnumerable<ColumnSpec>

DefineOrdering(IEntityInfo)

The sort clauses to apply to the list. Return an empty sequence to use the entity's modelled default sort (SortProperty/SortAscending).

IEnumerable<ListOrdering> DefineOrdering(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IEnumerable<ListOrdering>

DefinePreloads(IEntityInfo)

The relationship paths the list's page query preloads, in addition to the paths its columns require. Defaults to the list preload profile.

IEnumerable<RelationshipPath> DefinePreloads(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

IEnumerable<RelationshipPath>

GetMessage(IEntityInfo, IEntity)

An optional status message for a row: table rows tint by its level and show its text as a tooltip; summary cards display it as a chip.

Message? GetMessage(IEntityInfo metadata, IEntity row)

Parameters

metadata IEntityInfo
row IEntity

Returns

Message?

Match(IEntityInfo)

bool Match(IEntityInfo metadata)

Parameters

metadata IEntityInfo

Returns

bool