public bool Update(BulletinBoard obj) { try { _db.SubmitChanges(); } catch (Exception ex) { Debug.Print(ex.Message); return(false); } return(true); }
public int Add(BulletinBoard obj) { try { _db.BulletinBoards.InsertOnSubmit(obj); _db.SubmitChanges(); } catch (Exception ex) { Debug.Print(ex.Message); return(-1); } return(_db.BulletinBoards.Max(x => x.BulletinBoardId)); }