If you wish to add the models manually, then go through the following instructions. We will be adding a single code file called WeatherData.cs, which will contain multiple classes:
- In the Weather project, create a folder called Models.
- Add a file called WeatherData.cs.
- Add the following code:
using System.Collections.Generic;
namespace Weather.Models
{
public class Main
{
public double temp { get; set; }
public double temp_min { get; set; }
public double temp_max { get; set; }
public double pressure { get; set; }
public double sea_level { get; set; }
public double grnd_level { get; set; }
public int humidity { get; set; }
public double temp_kf { get; set; }
}
public class Weather
{
public int id { get; set; }
public string main { get; set; }
public string description { get; set; }
public string icon { get; set; }
}
public class...