public WeatherForecast Post([FromBody] WeatherForecast forecast) { return(forecast); }
public ActionResult <WeatherForecast> Post([FromBody] WeatherForecast newForcast) { _logger.LogInformation($"Forcast received {newForcast.Date} {newForcast.TemperatureC}"); return(CreatedAtAction(nameof(Post), newForcast)); }
public WeatherForecast Post(WeatherForecast dto) { // Call the data source. dto.Summary = "Weather Forcast added"; return(dto); }