tags:

views:

188

answers:

2

In an ASP.NET MVC project, where is the best place to put my classes that implement IRouteConstraint in order to keep it organized and stay true to the structure of the project?

+1  A: 

What I would do is put all routing base classes and helper classes in a routing folder. Then have more specific classes in subfolders.

+2  A: 

I am investing in a separate project with generic MVC definitions like route constraints and custom (but generic) ActionResult-based types. The MVC Web Project then references the genreric MVC Class project.

rasx
+1: It makes sense when there is a lot of such classes. It could be a class library with `Company.Product.Mvc` namespace!
Anton