public void Commit() { using (ITransaction transaction = SessionFactory.GetCurrentSession().BeginTransaction()) { try { transaction.Commit(); } catch (Exception ex) { transaction.Rollback(); throw; } } }
public void RegisterAmended(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository) { SessionFactory.GetCurrentSession().SaveOrUpdate(entity); }
public void RegisterRemoved(Infrastructure.IAggregateRoot entity, IUnitOfWorkRepository unitOfWorkRepository) { SessionFactory.GetCurrentSession().Delete(entity); }