/MvcApplicationAPI/App_Start/WebApiConfig.cs
C# | 25 lines | 20 code | 3 blank | 2 comment | 0 complexity | 72c3b71ce78fa41fb1a90a67f7089561 MD5 | raw file
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web.Http;
- namespace MvcApplicationAPI
- {
- public static class WebApiConfig
- {
- public static void Register(HttpConfiguration config)
- {
- config.Routes.MapHttpRoute(
- name: "DefaultApi",
- routeTemplate: "api/{controller}/{id}",
- defaults: new { id = RouteParameter.Optional }
- );
- config.EnableQuerySupport();
- // To disable tracing in your application, please comment out or remove the following line of code
- // For more information, refer to: http://www.asp.net/web-api
- TraceConfig.Register(config);
- }
- }
- }