Ejemplo n.º 1
0
 public IEnumerable <WeatherLocation> GetAll()
 {
     using (var weatherlocationContext = new WeatherLocationContext())
     {
         return(weatherlocationContext.WeatherLocations.ToList());
     }
 }
Ejemplo n.º 2
0
 public void Remove(WeatherLocation location)
 {
     using (var weatherlocationContext = new WeatherLocationContext())
     {
         weatherlocationContext.WeatherLocations.Remove(location);
         weatherlocationContext.SaveChanges();
     }
 }