Skip to content

ListRequestHandlerAsync<TRow,TListRequest,TListResponse> class

namespace: Serenity.Services   assembly: Serenity.Net.Services

Generic base class for asynchronous list request handlers

public class ListRequestHandlerAsync<TRow, TListRequest, TListResponse> : 
    ListRequestHandlerBase<TRow, TListRequest, TListResponse>, 
    IListHandlerAsync<TRow, TListRequest, TListResponse>, IListQueryCaptureAsync, 
    IListRequestProcessorAsync
    where TRow : class, IRow, new()
    where TListRequest : ListRequest
    where TListResponse : ListResponse<TRow>, new()
parameter description
TRow Entity type
TListRequest List request type
TListResponse List response type

Public Members

name description
ListRequestHandlerAsync(…) Initializes a new instance of the class.
CaptureQueryAsync(…) Builds the query this handler would execute for the request, without executing it. The request is validated, and the query is prepared and filtered by the handler and its behaviors as usual, with ExecutionMode set to QueryCapture. The query has no key order, sort, paging or total count, as it is meant to be used as a source of another query. Anything the handler or its behaviors would do after the query is executed, e.g. in ProcessEntity, OnAfterExecuteQuery or OnReturn, does not happen.
ListAsync(…)
ProcessAsync(…) Processes the list request asynchronously. This is the entry point for the handler.

Protected Members

name description
behaviors Lazy list of behaviors that is activated for this request.
virtual ApplyFiltersAsync(…) Applies all the filters including Request.EqualityFilter, Request.Criteria and Request.IncludeDeleted to the query.
virtual ExecuteQueryAsync(…) Executes the query sets values / entities and total count.
override MapFieldExpression(…)
virtual OnAfterExecuteQueryAsync(…) Called after executing the list query
virtual OnBeforeExecuteQueryAsync(…) Called before executing the list query
virtual OnReturnAsync(…) Called just before returning the response
virtual PrepareQueryAsync(…) Prepares query by selecting fields.
virtual ValidateRequestAsync(…) Validates the request by checking permissions.

See Also