Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="weather"></param>
        public void Update(Weather weather)
        {
            //Db.Updateable<Weather>(weather).UpdateColumns(x => new { x.Aqi, x.AddDate, x.Direct, x.Future, x.Temperature, x.Humidity, x.Power, x.Info })
            //   .WhereColumns(s => new { s.Id });

            CurrentDb.Update(weather);
        }
Beispiel #2
0
 /// <summary>
 /// 根据实体更新,实体需要有主键
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public virtual bool Update(T obj)
 {
     return(CurrentDb.Update(obj));
 }