The next step we need to take is to add the controller for our application:
- Right-click the Controllers folder and select Add, and then click on Controller from the context menu:
- Add a new controller called InformationController by selecting MVC Controller - Empty from the Add Scaffold screen. The following using statements need to be added to the controller:
using DarkSky.Models; using DarkSky.Services; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using System.Globalization; using System.IO; using System.Net.Http; using System.Runtime.InteropServices; using ...