In dotnet core default case for serializing output to json is camelCase. We can change the default case to Pascal by setting the new DefaultContractResolver
Steps
- Go to Startup.cs class file.
- Find Startup.ConfigureServices method and add the below line of code.
public void ConfigureServices(IServiceCollection services) { // Add Services services.AddMvc() .AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver()); }