RouteArea is meant for use with MVC controllers, which have a formal concept of areas. In web api, just use RoutePrefix.
What is the difference between RouteArea and RoutePrefix using AttributeRouting
-
13-04-2022 - |
Question
So I have been using http://attributerouting.net/ and love it. However, I cannot seem to wrap my head around when I should use RouteArea, or RoutePrefix, or both.
For instance, my thought is that with an API controller, use RouteArea("api"), and then for a prefix maybe use the main function of the controller? Any clarification would be helpful, thank you!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow