Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What ASP.NET MVC Routing framework to choose?

I really enjoyed the idea to use Attributes to control ASP.NET MVC routing, so instead of registering a new route and polute Global.asax.cs or *AreaRegistration.cs, I have something like this:

[Route("users/{userrId}/pages/{pageId}"]
public ActionResult Some(int userId, int pageId) { }

I see the great answer: ASP.NET MVC Routing Via Method Attributes, but I would like to get some "real-use" recommendations.

  1. Which routing framework you would recommend?
  2. How easy to start up and change existing code for usage?
  3. Is it available on NuGet?

.. and is it really worth to use that, can it be treated as best (perhaps good?) practice?

like image 309
Alexander Beletsky Avatar asked Jan 03 '12 10:01

Alexander Beletsky


1 Answers

I did try routing via method attributes while ago. Wouldn't use any framework for routing.

I think it's best to just follow "standard" scheme.

Also - unit testing each route individually helped me quite a lot
(I even wrote test that fails in case I've missed any route).

like image 102
Arnis Lapsa Avatar answered Sep 28 '22 11:09

Arnis Lapsa