We have explored how to create query objects and applied patterns that would provide neat separation between queries and commands. We started with a simple query object, then created a repository that would wrap complete CRUD operations, followed by leveraging query objects in the repositories. Later, we created commands and objects, which were also incorporated into the repositories. Finally, we created expression trees to simplify and reuse the conditions and Where predicates in the query execution.
We have been working on an application that cannot be recovered from any failure. In Chapter 9, Fail Safe Mechanism – Transactions, we will revisit the application and handle code from any failures, using transactions.