public new WeatherForecast Insert(CreateWeatherDto newItem) { var item = base.Insert(newItem); sourceCache.AddOrUpdate(item); return(item); }
public WeatherForecast Insert(CreateWeatherDto newItem) { var item = new WeatherForecast { Id = Guid.NewGuid(), Date = newItem.Date, Summary = newItem.Summary, Region = newItem.Region, TemperatureC = newItem.TemperatureC }; logger?.LogInformation("Insert DB id:{0}", item.Id); items.Add(item); return(item); }
public WeatherForecast InsertSingle( [FromBody] CreateWeatherDto newItemDto) { return(repository.Insert(newItemDto)); }