public override void Delete(Weather yr)
 {
     if (yr.EntityState != EntityState.Deleted)
     {
         this._entities.Weathers.Attach(yr);
     }
     this._entities.Weathers.DeleteObject(yr);
 }
        public override void Update(Weather yr)
        {
            ObjectStateEntry entry;
            if (!this._entities.ObjectStateManager.TryGetObjectStateEntry(yr, out entry) ||
                entry.State == EntityState.Detached)
            {
                this._entities.Weathers.Attach(yr);
            }

            if (yr.EntityState != EntityState.Modified)
            {
                this._entities.ObjectStateManager.ChangeObjectState(yr, EntityState.Modified);
            }
           
        }
 /// <summary>
 /// Create a new Weather object.
 /// </summary>
 /// <param name="weatherID">Initial value of the WeatherID property.</param>
 /// <param name="locationID">Initial value of the LocationID property.</param>
 /// <param name="temperature">Initial value of the Temperature property.</param>
 /// <param name="symbol">Initial value of the Symbol property.</param>
 /// <param name="time">Initial value of the Time property.</param>
 public static Weather CreateWeather(global::System.Int32 weatherID, global::System.Int32 locationID, global::System.String temperature, global::System.String symbol, global::System.DateTime time)
 {
     Weather weather = new Weather();
     weather.WeatherID = weatherID;
     weather.LocationID = locationID;
     weather.Temperature = temperature;
     weather.Symbol = symbol;
     weather.Time = time;
     return weather;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Weathers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWeathers(Weather weather)
 {
     base.AddObject("Weathers", weather);
 }
 public override void Add(Weather yr)
 {
     this._entities.Weathers.AddObject(yr);
 }