public bool Update(AMW.Model.Entity.MldComment model) { Dictionary <string, object> dic = new Dictionary <string, object>(); if (model.ContentValueFlag) { dic.Add("Content", model.Content); } if (model.AddTimeValueFlag) { dic.Add("AddTime", model.AddTime); } return(DBHelper.Update("MldComment").Set(dic).Where("id=@1", model.ID).Execute() > 0); }
public int Add(AMW.Model.Entity.MldComment model) { Dictionary <string, object> dic = new Dictionary <string, object>(); if (model.ContentValueFlag) { dic.Add("Content", model.Content); } if (model.AddTimeValueFlag) { dic.Add("AddTime", model.AddTime); } return(DBHelper.InsertInto("MldComment", dic)); }