Beispiel #1
0
 public int CreateNewBoard(BoardDto board)
 {
     int newBoardId;
     using (var sessionFactory = _sessionFactoryProvider.BuildSessionFactory())
     using (var session = sessionFactory.OpenSession())
     {
         newBoardId = (int)session.Save(board);
         session.Flush();
     }
     return newBoardId;
 }
Beispiel #2
0
 public void UpdateBoard(BoardDto board)
 {
     using (var sessionFactory = _sessionFactoryProvider.BuildSessionFactory())
     using (var session = sessionFactory.OpenSession())
     {
         session.Update(board);
         session.Flush();
     }
 }