Interface IListSpec
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
metadataIEntityInfocontextIEntityContext
Returns
DefineColumns(IEntityInfo)
IEnumerable<ColumnSpec> DefineColumns(IEntityInfo metadata)
Parameters
metadataIEntityInfo
Returns
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
metadataIEntityInfo
Returns
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
metadataIEntityInfo
Returns
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
metadataIEntityInforowIEntity
Returns
Match(IEntityInfo)
bool Match(IEntityInfo metadata)
Parameters
metadataIEntityInfo