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

            return(weather);
        }