ListRequestHandler<TRow,TListRequest,TListResponse> class
namespace: Serenity.Services assembly: Serenity.Net.Services
Generic base class for list request handlers
public class ListRequestHandler<TRow, TListRequest, TListResponse> :
ListRequestHandlerBase<TRow, TListRequest, TListResponse>,
IListHandler<TRow, TListRequest, TListResponse>, IListQueryCapture, IListRequestProcessor
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 |
| ListRequestHandler(…) |
Initializes a new instance of the class. |
| CaptureQuery(…) |
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. |
| List(…) |
|
| Process(…) |
Processes the list request. This is the entry point for the handler. |
Protected Members
| name |
description |
| behaviors |
Lazy list of behaviors that is activated for this request. |
| virtual ApplyFilters(…) |
Applies all the filters including Request.EqualityFilter, Request.Criteria and Request.IncludeDeleted to the query. |
| virtual ExecuteQuery() |
Executes the query sets values / entities and total count. |
| override MapFieldExpression(…) |
|
| virtual OnAfterExecuteQuery() |
Called after executing the list query |
| virtual OnBeforeExecuteQuery() |
Called before executing the list query |
| virtual OnReturn() |
Called just before returning the response |
| virtual PrepareQuery(…) |
Prepares query by selecting fields. |
| virtual ValidateRequest() |
Validates the request by checking permissions. |
See Also