I am new to ASP.Net Web Api Core. I have been using ASP.Net MVC for past few years and I always have written an ActionFilter a
here is a code snippet to adjust the settings for a .net core application
public void ConfigureServices(IServiceCollection services)
{
services
.AddMvc()
.AddJsonOptions(options => {
// send back a ISO date
var settings = options.SerializerSettings;
settings.DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat;
// dont mess with case of properties
var resolver = options.SerializerSettings.ContractResolver as DefaultContractResolver;
resolver.NamingStrategy = null;
});
}