public Board Get() { Board board = default(Board); board = this.session.Load<Board>(Board.BoardId); if (board == null) { board = new Board(); this.session.Store(board); this.session.SaveChanges(); } return board; }
public void Save(Board board) { this.session.Store(board); this.session.SaveChanges(); }