appsecguy
appsecguy

Reputation: 1049

What is the difference between RouteArea and RoutePrefix using AttributeRouting

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!

Upvotes: 1

Views: 6887

Answers (1)

spot
spot

Reputation: 2423

RouteArea is meant for use with MVC controllers, which have a formal concept of areas. In web api, just use RoutePrefix.

Upvotes: 4

Related Questions