Is it better to define all routes in the Global.asax than to define separately in the areas?
- by Matthew Patrick Cashatt
I am working on a MVC 4 project that will serve as an API layer of a larger application.
The developers that came before me set up separate Areas to separate different API requests (i.e Search, Customers, Products, and so forth).
I am noticing that each Area has separate Area registration classes that define routes for that area. However, the routes defined are not area-specific (i.e. {controller}/{action}/{id} might be defined redundantly in a couple of areas).
My instinct would be to move all of these route definitions to a common place like the Global.asax to avoid redundancy and collisions, but I am not sure if I am correct about that.