Technical Insights: Azure, .NET, Dynamics 365 & EV Charging Architecture

Month: February 2015

Replace Invisible Characters – Control Chars

You can use this function to replace the invisible chars

Regex.Replace(s, @"[^\x20-\x7F]", "");

Camel Case for Web Api 2

To convert your DTO to become Camel Case, you can use the code below

//Camel Case settings
var settings = GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings;
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
settings.Formatting = Formatting.Indented;

Powered by WordPress & Theme by Anders Norén