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

            return(weather);
        }