Tightly coupling generic types
Update : Instead of decorating responses with IResponseFor<T> I now instead decorate the command/query with IExpectResponse<T> - Each command/query should only have one response type, and this way it makes it possible to specify the return type should be something simple like a GUID. My server application works purely on a request/response pattern, like so var query = new GetCustomerQuery(customerUniqueID); var response = AppServer.Execute < GetCustomerQuery , GetCustomerQueryResponse > (query); What I wanted to avoid though was the possibility that the user (me writing the client app) would do something silly like the following code and use the wrong pair combination var query = new GetCustomerQuery(customerUniqueID); var response = AppServer.Execute < GetCustomerQuery , GetEmployeeQueryResponse > (query); Up until now I had the server interface defined like this, so that I can at least ensure the generic parameters are a Query and R