I have a system that uses CQRS with the Queries written using Dapper. It's worked out well, except that there has been a proliferation of query classes that do almost the same thing. The downside of this is that additional queries mean additional maintenance overhead (especially because of the SQL strings) and other problems associated with having lots of small classes, but the upside is that the classes conform to the Single Responsibility Principle and are somewhat easier to reason about.If I was using stored procs, I'd probably just create a few bigger, general purpose queries (in order to mimimize the overhead of maintaining the SQL) but the opposite seems to be the case in this implementation. What's the best approach in terms of query size? Should there be a query per viewmodel, or should the queries be decomposed?
CQRS: how granular should the queries be?
sql;mvvm;single responsibility;cqrs;dapper