> For the complete documentation index, see [llms.txt](https://brightercommand.gitbook.io/paramore-brighter-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker.md).

# Darker

- [Darker Basic Configuration](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/darkerbasicconfiguration.md): Darker is the query-side counterpart to Brighter, implementing the Query Object pattern for CQRS (Command Query Responsibility Segregation) architectures.
- [Darker Configuration Reference](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/darkerbasicconfiguration/darkerconfigurationreference.md): The options AddDarker and AddHandlersFromAssemblies take: the query processor's service lifetime, and the strategies available for registering handlers.
- [Queries and Query Objects](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/queriesandqueryobjects.md): The Query Object pattern separates the parameters of a query from the execution of that query.
- [Query Result Types](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/queriesandqueryobjects/queryresulttypes.md): The result type specified in IQuery\<TResult> can be any C# type.
- [Query Object Validation](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/queriesandqueryobjects/queryobjectvalidation.md): Query objects should validate their parameters to ensure they receive valid data.
- [How to Implement a Query Handler](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/implementaqueryhandler.md): Query handlers are the entry point to your query execution logic in Darker.
- [Query Handler Dependencies](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/implementaqueryhandler/queryhandlerdependencies.md): Query handlers typically need dependencies like repositories, database contexts, or services to execute queries.
- [Testing Query Handlers](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/implementaqueryhandler/testingqueryhandlers.md): Query handlers are easy to test because they have clear inputs (queries) and outputs (results), with dependencies that can be mocked or replaced.
- [Query Pipeline and Decorators](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypipeline.md): The Query Pipeline in Darker provides a powerful way to add cross-cutting concerns to your query handlers without modifying the handler code itself.
- [Query Pipeline Policies](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypipeline/querypipelinepolicies.md): Darker's policy decorators are powered by Polly, a .NET resilience and transient-fault-handling library.
- [Darker and Brighter Pipelines](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypipeline/darkerandbrighterpipelines.md): Darker's query pipeline shares many similarities with Brighter's request pipeline, as both implement the same Russian Doll Model for middleware composition.
- [Query Patterns](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns.md): This guide presents common query patterns you'll encounter when building real-world applications with Darker.
- [Parameterized Query Patterns](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns/parameterizedquerypatterns.md): Query recipes that take parameters: looking up a single entity, filtering a list, and searching on several criteria at once.
- [Pagination Query Patterns](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns/paginationquerypatterns.md): How to page through a large result set in Darker, by offset and by cursor, with the trade-offs of each.
- [Projection Query Patterns](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns/projectionquerypatterns.md): How to return only the fields a caller needs: simple projections, projections across joins, and calculated fields.
- [Collection and Aggregation Query Patterns](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns/aggregationquerypatterns.md): How to return whole collections, counts, and summary statistics from a query handler.
- [Entity Framework Core Query Integration](https://brightercommand.gitbook.io/paramore-brighter-documentation/darker/querypatterns/efcorequeryintegration.md): How to run Darker queries against Entity Framework Core: tracking, eager loading, handler lifetime and compiled queries.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://brightercommand.gitbook.io/paramore-brighter-documentation/darker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
