Table of Contents

Class BoundQuery<T>

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

Headless data source for presenting an entity query. Caches, prerenders, preloads and pages.

public sealed class BoundQuery<T> : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable where T : IEntity<T>

Type Parameters

T
Inheritance
BoundQuery<T>
Implements
Inherited Members

Constructors

BoundQuery()

public BoundQuery()

Properties

AllowDirtyReads

Loads entity data without a transaction.

[Parameter]
public bool AllowDirtyReads { get; set; }

Property Value

bool

ChildContent

Receives the QueryResult<T> this component maintains.

[Parameter]
public RenderFragment<QueryResult<T>>? ChildContent { get; set; }

Property Value

RenderFragment<QueryResult<T>>

Count

Item count for Query, if the caller already knows it. Fetched automatically otherwise.

[Parameter]
public int? Count { get; set; }

Property Value

int?

IncludePaths

Relationship paths to load with each page.

[Parameter]
public IReadOnlyCollection<RelationshipPath>? IncludePaths { get; set; }

Property Value

IReadOnlyCollection<RelationshipPath>

OnUpdated

Raised when the query's membership changes - the cache pushes a new count, or rows join, leave or reorder within a retained page. Consumers should refresh their pager (e.g. Virtualize.RefreshDataAsync); retained pages serve the refetch. Changes to a row's own data are applied to the presented instance in place and do not raise this.

[Parameter]
public EventCallback OnUpdated { get; set; }

Property Value

EventCallback

Once

If set, only stale counts and pages subscribe to cache updates, and only until their revalidation lands; otherwise they track cache updates for as long as they are retained.

[Parameter]
public bool Once { get; set; }

Property Value

bool

Ordering

Sort clauses applied to pages, falling back to the entity's modelled default sort or the query's ordering.

[Parameter]
public IReadOnlyList<ListOrdering>? Ordering { get; set; }

Property Value

IReadOnlyList<ListOrdering>

PageSize

Rows per page: whatever ranges the pager requests, rows are read through the cache and retained in pages of this size.

[Parameter]
public int PageSize { get; set; }

Property Value

int

Query

The query to load.

[Parameter]
[EditorRequired]
public required IEntityQuery<T> Query { get; set; }

Property Value

IEntityQuery<T>

RetainedPageCount

How many recently requested pages stay loaded, and subscribed to cache updates, once the pager has moved on.

[Parameter]
public int RetainedPageCount { get; set; }

Property Value

int

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder builder)

Parameters

builder RenderTreeBuilder

A RenderTreeBuilder that will receive the render output.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

OnParametersSetAsync()

Method invoked when the component has received parameters from its parent in the render tree, and the incoming values have been assigned to properties.

protected override Task OnParametersSetAsync()

Returns

Task

A Task representing any asynchronous operation.