lib/generators/netmvc/scaffold/Startup.cs.erb in minke-generator-netmvc-0.1.0 vs lib/generators/netmvc/scaffold/Startup.cs.erb in minke-generator-netmvc-0.8.0
- old
+ new
@@ -26,10 +26,13 @@
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
- services.AddMvc();
+ services.AddMvc().AddJsonOptions(options =>
+ {
+ options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
+ });
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{