How to handle Queries that don't have Properties

May 11, 2013 at 11:13 AM
I really like using the IQuery and IQueryHandler interfaces, but how do you handle Queries that might not need Input Properties. EG : FindCountOfOrdersQuery.
In this case would you just create an empty class to pass to the QueryHandler?
Dec 8, 2014 at 10:57 AM
Hi Jethro,

I'm very sorry for this late reply. I just noticed that I didn't configure e-mail notification for this project, and I never noticed that questions where posted here.

The answer to your question is simple: It's completely fine to have query objects that don't have any parameters. You can just call:
this.queryProcessor.Execute(new FindCountOfOrdersQuery());