Frage

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!

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top