-
Notifications
You must be signed in to change notification settings - Fork 2
How to configure routing
marektihkan edited this page Sep 13, 2010
·
1 revision
- Create class (Routes) to
Solution.Configuration.Routing
namespace. - Inherit from
Arc.Infrastructure.Presentation.Mvc.RoutesConfiguration
. - Implement interface and add your routes.
- Add
Arc.Infrastructure.Presentation.Mvc.PresentationConfiguration.WithRouting<Routes>()
to application configuration.
- It’s possible to configure routes ASP.NET MVC way as well.
namespace Example.Configuration.Routes
{
public class Routes : Arc.Infrastructure.Presentation.Mvc.RoutesConfiguration
{
protected override void Configure()
{
Ignore(
Route.Named("Resources").Url("{resource}.axd/{*pathInfo}")
);
Map(
Route.Named("Default")
.Url("{controller}/{action}/{id}")
.DefaultsAre(new { controller = "Home", action = "Index", id = "" })
);
}
}
}