public void UpdateWeather(Models.Models.WeatherForecast weatherForecast) { var updateWeather = mapper.Map <Models.DBContexts.WeatherForecast>(weatherForecast); _trackerDbContext.Entry(updateWeather).State = EntityState.Modified; Save(); }
public void InsertWeather(Models.Models.WeatherForecast weatherForecast) { var insertWeather = mapper.Map <Models.DBContexts.WeatherForecast>(weatherForecast); _trackerDbContext.Add(insertWeather); Save(); }