Reputation: 47
I need to create ASP.NET WebApi with couple operation, for example RegisterAppStart, RegisterStep and RegisterAppEnd. And I want to place all this actions in one controller. As I read, usually in WebApi action name is not using. And my question - is this a bad idea to rewrite default route config with actions using?
ps. sorry for my English
Upvotes: 0
Views: 57
Reputation: 151740
You can give actions arbitrary names using the [Route("/api/FooController/BarMethod"]
attribute routing.
This usually overrides the "REST"yness of your service (where the request method indicates which method should be called), but as you aren't really building a REST service, you shouldn't care.
Upvotes: 1