Example #1
0
 public void Update(Message model)
 {
     var target = Find(model.ID);
     db.Attach<Message>(target);
     target.Content = model.Content;
     target.Title = model.Title;
     db.Commit();
 }
Example #2
0
 public void Delete(Message model)
 {
     var target = Find(model.ID);
     db.Remove<Message>(target);
     db.Commit();
 }
Example #3
0
 public void Create(Message model)
 {
     db.Add<Message>(model);
     db.Commit();
 }