Right now we have a lot of dummy MVC controllers that return simple views with web components (vuejs). I'm trying to refactor this to see if we can use the controllerless razor plugin but I don't want to execute the actual service logic when the route is requested by the browser because the component already does this. An example:
/account/edit/1
is a standard MVC controller -> is associated to a view that has something like this <account edit="1" />
that makes an ajax call to /api/account/get/1
. I want to add the Service Stack Razor engine so that we can just use:
/api/account/get/1
(we would remove the api part or add the alternate route) and this would not execute the logic but would execute the security attributes so we can remove the standard MVC controllers that aren't be used. I know we can add different services for this to get it to work but I would prefer to use the same endpoint and just not execute it but return the razor.
Any ideas?
Not the answer I wanted to hear but essentially we can't do what we want, instead we'll create some dummy service stack services to return the correct views which still eliminates the controllers.