// [OperationBehavior(TransactionScopeRequired =true)] public void SubmitWeather(Weather weather) { _Context.Weathers.Add(weather); _Context.SaveChanges(); }
public void EditRecordInDatabase(Weather weather) { _Context.Entry(weather).State = EntityState.Modified; _Context.SaveChanges(); }
public Weather DeleteWeather(int?id) { Weather weather = _Context.Weathers.Find(id); return(weather); }