Last active
March 17, 2017 00:01
-
-
Save A2H111/64c129b086f32cbfe94a963fa88fd0f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Register(HttpConfiguration config) | |
{ | |
// Web API configuration and services | |
// Web API routes | |
config.MapHttpAttributeRoutes(); | |
config.Routes.MapHttpRoute( | |
name: "CustomerApi", | |
routeTemplate: "api/{controller}/{action}/{id}", | |
defaults: new { id = RouteParameter.Optional }); | |
config.Routes.MapHttpRoute( | |
name: "DefaultApi", | |
routeTemplate: "api/{controller}/{id}", | |
defaults: new { id = RouteParameter.Optional } | |
); | |
config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment