예제 #1
0
        public static Temperature LastTemperatureExt(this City city, IConfiguration config)
        {
            var temperatureRepository = new TemperatureRepository(config);
            var lastTemperature       = temperatureRepository.GetLast(city.Id);

            city.Temperatures = new List <Temperature> {
                lastTemperature
            };

            return(lastTemperature);
        }