Skip to content

ListRequest class

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

The request model for a List service.

public class ListRequest : ServiceRequest, IIncludeExcludeColumns

Public Members

name description
ListRequest() The default constructor.
ColumnSelection { get; set; } Group of columns to select. This is ColumnSelection.List, e.g. only the table fields, not view fields by default.
ContainsField { get; set; } If specified, the text is only searched in this column. The column should still have a QuickSearchAttribute.
ContainsText { get; set; } The text to search in columns with the QuickSearchAttribute.
Criteria { get; set; } The where criteria for the query. This is passed as an array of arrays in the JSON.
DistinctFields { get; set; } Distinct set of columns. If set a DISTINCT query is used, and only these columns can be returned from the query.
EqualityFilter { get; set; } A dictionary of field name / value pairs used to filter those fields by the passed value. Please note that "NULL" values are ignored, so you can't filter a field with a NULL value.
ExcludeColumns { get; set; }
ExcludeTotalCount { get; set; } Exclude the total count from the result. When true, the total number of records is not calculated (no extra COUNT(*)) and TotalCount is left as zero. When false, the total is calculated for paged requests (when Take is greater than zero). When null (the default, i.e. not sent), the total is calculated for paged requests unless IncludeMore is true or the handler's RequestHandlerSettings.ExcludeTotalCountByDefault is enabled. A zero Take that paging limits turn into an actual page size still returns the total, regardless of that setting, unless IncludeMore is requested.
ExportColumns { get; set; } Gets or sets the set of columns to export. This should only be used to specify list of columns for contexts like Excel export etc.
IncludeColumns { get; set; }
IncludeDeleted { get; set; } Include the deleted records. Default is false. This is only supported by services and entities that implement soft delete, e.g. IsActive etc. The value is ignored unless the current user has the undelete permission (UndeletePermissionAttribute, falling back to delete, modify and read permissions).
IncludeMore { get; set; } Include whether more records are available beyond the requested page in the response.
Localize { get; set; } Set to "true" to localize fields with the Localize attribute. Note that this will also affect filtering and sorting as the field's expression will be changed to a COALESCE one. To get a localized version in a specific language, pass the language code as the value.
Skip { get; set; } Number of records to skip
Sort { get; set; } Columns to sort returned records by
Take { get; set; } Number of records to take

See Also