December 2018
Intermediate to advanced
416 pages
10h 30m
English
To make it easier to change the external weather service and to make the code more testable, we will create an interface for the service. Here's how we go about it:
public interface IWeatherService { Task<Forecast> GetForecast(double latitude, double longitude); }
When we have an interface, we can create an implementation for it by going through the following steps: