Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 705 Bytes

README.md

File metadata and controls

13 lines (9 loc) · 705 Bytes

Strongly typed ASP.NET MVC MapRoute

This implementation of strongly typed MapRoute is based on the code by Diego Perez, but it can work with areas (even without specifying namespaces). Also you can forget about specifying routes names and even url (for inner actions) if you want.

Usage:

routes.MapRoute<MyController>(c => c.InnerAction());
routes.MapRoute<MyController>("some/action/{parameter}", c => c.Action("Default parameter value"));
routes.MapRoute<MyController>("some/another/action/{parameter}", c => c.Action(ItIs.Any<string>())); //No default value