public void Update(GeoName geoName)
        {
            if (!this.IsAttatched(geoName))
            {
                this._enteties.GeoNameSet.Attach(geoName);
            }

            this._enteties.ObjectStateManager.ChangeObjectState(geoName, EntityState.Modified);
        }
 /// <summary>
 /// Create a new GeoName object.
 /// </summary>
 /// <param name="locationId">Initial value of the locationId property.</param>
 /// <param name="countyName">Initial value of the countyName property.</param>
 /// <param name="name">Initial value of the name property.</param>
 /// <param name="countryName">Initial value of the countryName property.</param>
 /// <param name="latitude">Initial value of the latitude property.</param>
 /// <param name="longitude">Initial value of the longitude property.</param>
 /// <param name="geoNameId">Initial value of the geoNameId property.</param>
 public static GeoName CreateGeoName(global::System.Int32 locationId, global::System.String countyName, global::System.String name, global::System.String countryName, global::System.Double latitude, global::System.Double longitude, global::System.Int32 geoNameId)
 {
     GeoName geoName = new GeoName();
     geoName.locationId = locationId;
     geoName.countyName = countyName;
     geoName.name = name;
     geoName.countryName = countryName;
     geoName.latitude = latitude;
     geoName.longitude = longitude;
     geoName.geoNameId = geoNameId;
     return geoName;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the GeoNameSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGeoNameSet(GeoName geoName)
 {
     base.AddObject("GeoNameSet", geoName);
 }
        //http://www.yr.no/place/<countryName>/<name>/<toponymName>/forecast.xml
        public List<WeatherData> FindWeatherData(GeoName geoName)
        {
            var document = WeatherDataWebService.LoadDocument(String.Format("http://www.yr.no/place/{0}/{1}/{2}/forecast.xml", geoName.countryName, geoName.countyName, geoName.name));

            return document.Descendants("time").Select(weatherdata => WeatherDataFactory.Create(weatherdata, geoName.locationId)).ToList();
        }
 public void Add(GeoName geoName)
 {
     this._enteties.GeoNameSet.AddObject(geoName);
 }