I have web api controllers and I use this configuration method in the CamelCase WebApiConfig file for my results for all controllers.
var json = GlobalConfiguration.Configuration.Formatters.JsonFormatter;
json.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
Now I have a controller method that provides data to the Angularjs translation provider, and all the translation strings are not in camelcase in my html, which is why I need the results of this method so that they are not in CamelCase. Avoiding the serialization behavior of the camel body for this method of specific controllers.
source
share