Пример #1
0
 public IEnumerable <WeatherForecast> Get()
 {
     using var context = _entityContextFactory.Create();
     return(context.WeatherForecast.ToList());
 }
Пример #2
0
 public void Save(WeatherForecast weatherForecast)
 {
     using var context = _entityContextFactory.Create();
     context.WeatherForecast.Add(weatherForecast);
     context.SaveChanges();
 }