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