Beispiel #1
0
        public IActionResult Delete([FromBody] DateScope scope)
        {
            List <WeatherData> toDelete = _holder.TemperatureData.Where(i => i.Date >= scope.DateFrom && i.Date <= scope.DateTo).ToList();

            foreach (var t in toDelete)
            {
                _holder.TemperatureData.Remove(t);
            }
            return(OK());
        }
Beispiel #2
0
 public IEnumerable <WeatherData> Get([FromBody] DateScope scope)
 {
     return(_holder.TemperatureData.Where(i => i.Date >= scope.DateFrom && i.Date <= scope.DateTo).ToArray());
 }