public async Task <WeatherForecast> AddAsync(WeatherForecast forecast)
        {
            _ctx.WeatherForecasts.Add(forecast);
            await _ctx.SaveChangesAsync();

            return(forecast);
        }
Ejemplo n.º 2
0
        public async Task <Weather> SetWeatherAsync(Weather weather)
        {
            _context.Weathers.Add(weather);
            await _context.SaveChangesAsync();

            return(weather);
        }