示例#1
0
 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapLowerCaseUrlRoute(
         "manage_default",
         "manage/{controller}/{action}/{id}",
         new { controller = "Home", action = "Index", id = UrlParameter.Optional }, new string[] { "ZT.SMS.Web.Areas.manage.Controllers" }
         );
 }
示例#2
0
 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapLowerCaseUrlRoute(
         "Admin_default",
         "admin/{controller}/{action}/{id}",
         new { controller = "Home", action = "Index", id = UrlParameter.Optional },
         new[] { "Hmh.Admin.Areas.Admin.Controllers" }
         );
 }
 public override void RegisterArea(AreaRegistrationContext context)
 {
     context.MapLowerCaseUrlRoute(
         "Manage_default",
         "Manage/{controller}/{action}/{id}",
         new { action = "Index", id = UrlParameter.Optional },
         new[] { "OSharp.Demo.Web.Areas.Manage.Controllers" }
         );
 }
示例#4
0
        public override void RegisterArea(AreaRegistrationContext context)
        {
            HttpConfiguration config = GlobalConfiguration.Configuration;

            config.Routes.MapHttpRoute(
                "ServiceActionApi",
                "api/service/{controller}/{action}/{id}",
                new { area = "Service", id = RouteParameter.Optional }
                );
            config.Routes.MapHttpRoute(
                "ServiceApi",
                "api/service/{controller}/{id}",
                new { area = "Service", id = RouteParameter.Optional }
                );

            context.MapLowerCaseUrlRoute(
                "Service_default",
                "api/service/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
                );
        }
示例#5
0
 public static LowerCaseUrlRoute MapLowerCaseUrlRoute(this AreaRegistrationContext context, string name, string url, object defaults, string[] namespaces)
 {
     return(context.MapLowerCaseUrlRoute(name, url, defaults, null, namespaces));
 }
示例#6
0
 public static LowerCaseUrlRoute MapLowerCaseUrlRoute(this AreaRegistrationContext context, string name, string url)
 {
     return(context.MapLowerCaseUrlRoute(name, url, null));
 }