BuildFeed/App_Start/RouteConfig.cs

29 lines
699 B
C#
Raw Normal View History

2014-10-11 06:57:02 +08:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Http;
namespace BuildFeed
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapHttpRoute(
name: "API",
routeTemplate: "api/{action}/{id}",
defaults: new { controller = "api", action = "GetBuilds", id = UrlParameter.Optional }
);
2014-10-11 06:57:02 +08:00
routes.AppendTrailingSlash = true;
2015-03-12 07:30:11 +08:00
routes.MapMvcAttributeRoutes();
2014-10-11 06:57:02 +08:00
}
}
}