Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This cannot be right
.SetupOptions<MvcOptions>(options =>
var currentJson = options.OutputFormatters.FirstOrDefault(f => f.Instance is JsonOutputFormatter);
if (currentJson != null) options.OutputFormatters.Remove(currentJson);
options.OutputFormatters.Add(new JsonOutputFormatter(new JsonSerializerSettings { ContractResolver = new CamelCasePropertyNamesContractResolver() }, false));
Copy link

DaveVdE commented Sep 12, 2014

I agree. There's OfType<> to use instead of is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment