public WeatherForecast Post([FromBody] WeatherForecast forecast)
 {
     return(forecast);
 }
Beispiel #2
0
        public ActionResult <WeatherForecast> Post([FromBody] WeatherForecast newForcast)
        {
            _logger.LogInformation($"Forcast received {newForcast.Date} {newForcast.TemperatureC}");

            return(CreatedAtAction(nameof(Post), newForcast));
        }
Beispiel #3
0
 public WeatherForecast Post(WeatherForecast dto)
 {
     // Call the data source.
     dto.Summary = "Weather Forcast added";
     return(dto);
 }