Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created November 27, 2019 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/0ff6add038997c4b9544c1b2d5c33385 to your computer and use it in GitHub Desktop.
Save bjoerntx/0ff6add038997c4b9544c1b2d5c33385 to your computer and use it in GitHub Desktop.
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
// Web API configuration and services
// Web API routes
config.MapHttpAttributeRoutes();
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "{id}/api/{controller}",
defaults: new { id = RouteParameter.Optional }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment