var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers().AddJsonOptions( options => { options.JsonSerializerOptions.PropertyNamingPolicy = null; } );