Class QueryContext
- Namespace
- Cratis.Applications.Queries
- Assembly
- Cratis.Applications.dll
Defines the context for a query.
public record QueryContext : IEquatable<QueryContext>- Inheritance
- 
      
      QueryContext
- Implements
- Inherited Members
- Extension Methods
Constructors
QueryContext(FullyQualifiedQueryName, CorrelationId, Paging, Sorting, QueryArguments?, IEnumerable<object>?)
Defines the context for a query.
public QueryContext(FullyQualifiedQueryName Name, CorrelationId CorrelationId, Paging Paging, Sorting Sorting, QueryArguments? Arguments = null, IEnumerable<object>? Dependencies = null)Parameters
- NameFullyQualifiedQueryName
- The name of the query. 
- CorrelationIdCorrelationId
- The CorrelationId for the query. 
- PagingPaging
- The Paging information. 
- SortingSorting
- The Sorting information. 
- ArgumentsQueryArguments
- Optional arguments for the query. 
- DependenciesIEnumerable<object>
- Optional dependencies required to handle the query. 
Fields
NotSet
Represents a query context that is not set.
public static readonly QueryContext NotSetField Value
Properties
Arguments
Optional arguments for the query.
public QueryArguments? Arguments { get; init; }Property Value
CorrelationId
The CorrelationId for the query.
public CorrelationId CorrelationId { get; init; }Property Value
Dependencies
Optional dependencies required to handle the query.
public IEnumerable<object>? Dependencies { get; init; }Property Value
Name
The name of the query.
public FullyQualifiedQueryName Name { get; init; }Property Value
Paging
The Paging information.
public Paging Paging { get; init; }Property Value
Sorting
The Sorting information.
public Sorting Sorting { get; init; }Property Value
TotalItems
Gets or sets the total number of items in the query.
public int TotalItems { get; set; }