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