Class QueryHttpExtensions
- Namespace
- Cratis.Applications.Queries
- Assembly
- Cratis.Applications.dll
Provides common query processing functionality that can be used by both controller-based queries and pipeline-based queries.
public static class QueryHttpExtensions- Inheritance
- 
      
      QueryHttpExtensions
- Inherited Members
Fields
PageQueryStringKey
Gets the key for the page query string.
public const string PageQueryStringKey = "page"Field Value
PageSizeQueryStringKey
Gets the key for the page size query string.
public const string PageSizeQueryStringKey = "pageSize"Field Value
SortByQueryStringKey
Gets the key for the sort by query string.
public const string SortByQueryStringKey = "sortby"Field Value
SortDirectionQueryStringKey
Gets the key for the sort direction query string.
public const string SortDirectionQueryStringKey = "sortDirection"Field Value
Methods
GetPagingInfo(HttpContext)
Extracts paging information from the HTTP request query string.
public static Paging GetPagingInfo(this HttpContext httpContext)Parameters
- httpContextHttpContext
- The HTTP context. 
Returns
- Paging
- The paging information. 
GetQueryArguments(HttpContext, IQueryPerformer)
Extracts custom parameters from the HTTP request query string, excluding standard query processing parameters.
public static QueryArguments GetQueryArguments(this HttpContext httpContext, IQueryPerformer performer)Parameters
- httpContextHttpContext
- The HTTP context. 
- performerIQueryPerformer
- The query performer to get for. 
Returns
- QueryArguments
- A dictionary of custom parameters. 
GetSortingInfo(HttpContext)
Extracts sorting information from the HTTP request query string.
public static Sorting GetSortingInfo(this HttpContext httpContext)Parameters
- httpContextHttpContext
- The HTTP context. 
Returns
- Sorting
- The sorting information. 
SetResponseStatusCode(HttpResponse, QueryResult)
Sets the HTTP response status code based on the query result.
public static void SetResponseStatusCode(this HttpResponse response, QueryResult queryResult)Parameters
- responseHttpResponse
- The HTTP response. 
- queryResultQueryResult
- The query result.