usingSystem.Net.Http.Formatting;usingSystem.Web.Http;namespacePollutometerWebApi{publicstaticclassWebApiConfig{publicstaticvoidRegister(HttpConfigurationconfig){// Web API configuration and servicesconfig.Formatters.Clear();config.Formatters.Add(newJsonMediaTypeFormatter());// Web API routesconfig.MapHttpAttributeRoutes();config.Routes.MapHttpRoute(name:"DefaultApi",routeTemplate:"api/{controller}/{id}",defaults:new{id=RouteParameter.Optional});}}}