Namespace Savvyio.Queries
Use the Savvyio.Queries namespace to model the read side of a CQRS application. A query represents a request for data that does not change state — implement Query<TResult> for typed result queries, then register a QueryHandler to produce the answer.
Start with Query<TResult> for your query payload classes. Register a handler that extends QueryHandler<TQuery, TResult>, and configure dispatching with SavvyioOptions.AddQueryDispatcher and AddQueryHandler. Route queries through QueryDispatcher or the higher-level Mediator from Savvyio.Extensions.
Availability: .NET 10 and .NET 9
Extension Members
| Type | Ext | Methods |
|---|---|---|
| SavvyioOptions | ⬇️ | AddQueryHandler<TImplementation>, AddQueryDispatcher |
Classes
QueryDispatcher
Provides a default implementation of of the IQueryDispatcher interface.
QueryHandler
Provides a generic and consistent way of handling Query objects that implements the IQuery interface. This is an abstract class.
Query<TResult>
Provides a default implementation of of the IQuery<TResult> interface.
SavvyioOptionsExtensions
Extension methods for the SavvyioOptions class.
Interfaces
IQuery
A marker interface that specifies something that returns data.
IQueryDispatcher
Defines a Query dispatcher that uses Request-Reply/In-Out MEP.
IQueryHandler
Specifies a handler responsible for objects that implements the IQuery interface.
IQuery<TResult>
A marker interface that specifies something that returns data.