public static void Register(HttpConfiguration config) { // Web API configuration and services RestfulObjectsConfig.RegisterRestfulObjectsRoutes(RouteTable.Routes); // Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute("DefaultApi", "api/{controller}/{id}", new { id = RouteParameter.Optional } ); }
public static void PreStart() { RestfulObjectsConfig.RestPreStart(); RestfulObjectsConfig.RegisterRestfulObjectsRoutes(RouteTable.Routes); }