solidservices
solidservices copied to clipboard
Where are the Web API controllers?
Hi,
I've been looking at your solidservices project and noticed that the web api project doesn't define any controllers and it looks like you're probably doing some trickery for it to automatically generate the controllers from the commands and queries. Could you explain this a little or link me to the blog post about it?
I'm guessing you usually try and keep each controller to doing as little as possible and most of the time that controller revolves around the command, as this is what I've been doing with my MVC? The advantage of this is that I don't have constructor over injection.
Kind Regards, Richard
it looks like you're probably doing some trickery for it to automatically generate the controllers from the commands and queries.
There are no controllers. The project is Controllerless.
The trick here is to have one a DelegatingHandler that will do the dispatching directly to command handlers, and one DelegatingHandler that will do the dispatching to query handlers.