Saya membuat solusi API web inti Asp.net default dengan Visualstudio 2019.
Ubah services.AddControllers (); ke services.AddControllers (). AddXmlSerializerFormatters ();
Kirim Dapatkan Permintaan ke https://localhost:xxxxx/weatherforecast. dan saya mendapat tanggapan berikut
<ArrayOfWeatherForecast xmlns:xsi="http://www.w3.org.....>
<WeatherForecast>
...
</WeatherForecast>
......
</ArrayOfWeatherForecast>
Tapi saya sangat ingin mendapatkan respon seperti
<WeatherForecasts>
<WeatherForecast>
...
</WeatherForecast>
......
</WeatherForecasts>
Saya menemukan beberapa jawaban tentang menghapus arrayof frome asp.net. Tolong bantu aku. Bagaimana melakukan ini di inti asp.net.