예제 #1
0
 public void Commit()
 {
     using (ITransaction transaction = SessionFactory.GetCurrentSession().BeginTransaction())
     {
         try
         {
             transaction.Commit();
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             throw;
         }
     }
 }
예제 #2
0
 public void RegisterRemoved(IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     SessionFactory.GetCurrentSession().Delete(entity);
 }
예제 #3
0
 public void RegisterNew(IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository)
 {
     SessionFactory.GetCurrentSession().Save(entity);
 }