コード例 #1
0
 public void Commit()
 {
     using (ITransaction transaction = SessionFactory.GetCurrentSession().BeginTransaction())
     {
         try
         {
             transaction.Commit();
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw;
         }
     }
 }
コード例 #2
0
 public void RegisterAmended(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     SessionFactory.GetCurrentSession().SaveOrUpdate(entity);
 }
コード例 #3
0
 public void RegisterRemoved(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     SessionFactory.GetCurrentSession().Delete(entity);
 }