Re: How does a search functionality fit in DDD with CQRS?

"[email protected] [domaindrivendesign]" <[email protected]>
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
In our projects, we handle queries in a similar manner to commands. In our API controllers we map to or construct a query object. The query object is passed to a query processor for processing. Internally, the query processor routes the query object to it's corresponding query handler. It's an effective approach per you can encapsulate the details of the query processing into a separate handler. 

 We create a ReadModel assembly that contains the POCO/POJO read model classes and a ReadModel.Query assembly that contains the query specifications and query handlers.
 

 App.ReadModel: POCO/POJO objects
 App.ReadModel.Queries: Query specifications and query handlers
 App.Infastructure: Interfaces for query specifications and QueryProcessor implementation.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.