|
|
- using System.Web.Mvc;
- using System.Web.Routing;
-
- namespace Sevomin.WebFrontend
- {
- public class RouteConfig
- {
- public static void RegisterRoutes(RouteCollection routes)
- {
- routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
-
- #region For Account Controller
- routes.MapRoute(
- name: "Login",
- url: "login",
- defaults: new { controller = "Account", action = "Login" }
- );
- routes.MapRoute(
- name: "Logout",
- url: "logout",
- defaults: new { controller = "Account", action = "Logout" }
- );
- routes.MapRoute(
- name: "Signup",
- url: "new-account",
- defaults: new { controller = "Account", action = "Signup" }
- );
- routes.MapRoute(
- name: "UsernameValidator",
- url: "check-username",
- defaults: new { controller = "Account", action = "CheckUsername" }
- );
- #endregion
-
- #region For Jobs
- routes.MapRoute(
- name: "NewJob",
- url: "jobs/new-job",
- defaults: new { controller = "Job", action = "NewJob" }
- );
- #endregion
-
- routes.MapRoute(
- name: "Default",
- url: "{controller}/{action}/{id}",
- defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
- );
- }
- }
- }
|