-
Notifications
You must be signed in to change notification settings - Fork 126
MapRoute missing overload #217
Comments
In vNext, areas are determined by |
But what If I have the controllers on a different assembly how do I achieve that without the namespaces overload? |
Instead of using a list of namespaces to group your controllers we recommend using Areas. You can attribute your controllers (regardless of which assembly they are in) with a specific Area and then create a route for that Area. You can see a test website that shows an example of using Areas in MVC 6 here: https://github.com/aspnet/Mvc/tree/dev/test/WebSites/RoutingWebSite. Does this work for your scenario? |
Thanks for the example. |
And I suppose Im not the only one out there having this requirement :) |
I think you could still do that with Areas - you could have an Area and route for the controllers in each assembly, right? |
Could you give me an example? |
I dont think that's a solution really. Areas they have to be marked in each and every one controller. I don't want to use attribute routing. What I want is to map routes according to some parameters. Each route is on a different assembly as I described above. |
Nevermind. I used attribute routing for areas only. Created a sample. If you wish I can send it to include it in the examples. |
Cool - going to go ahead and close this issue. |
Hi,
I have noticed that on RouteBuilderExtensions MapRoute method string[] namespaces overload is missing. Any plans for it?
The text was updated successfully, but these errors were encountered: