public IEnumerable <WeatherForecast> Get() { using var context = _entityContextFactory.Create(); return(context.WeatherForecast.ToList()); }
public void Save(WeatherForecast weatherForecast) { using var context = _entityContextFactory.Create(); context.WeatherForecast.Add(weatherForecast); context.SaveChanges(); }