After having put the introduction and the commanding part behind us, let me explain how I deal with querying. Consider the following slice of the reference architecture.
![clip_image001[6] clip_image001[6]](/Lists/Posts/Attachments/232/clip_image0016_thumb_258D8B51.png)
My original intention was to use WCF Data Services combined with NHibernate on the query side. For one, because it allows you to filter the result set using a subset of the LINQ functionality at the Silverlight client. But also because it will transfer the resulting entity set including any associated relationships as one network operation; which is something that WCF RIA Services can't do. In essence it means that you don't have to explicitly convert entities to DTOs, but I kept the term in the diagram.
Read more…