/// <summary> /// Method to Commit and Close the session. /// If exception occurs, rollback will be handled automatically. /// </summary> public void CommitAndCloseSession() { Logger.Info("DataSyncMediatorImpl - CommitAndCloseSession started at " + DateTime.Now.ToString()); this.applicationSessionManager = new ApplicationSessionManager(); this.applicationSessionManager.CommitAndCloseSession(); Logger.Info("DataSyncMediatorImpl - CommitAndCloseSession ended at " + DateTime.Now.ToString()); }
internal BankruptcyGateway() { var applicationSessionManager = new ApplicationSessionManager(DataBaseConnectivity.Application); applicationSession = applicationSessionManager.Session; //MappingToDTO nHibernateToDomainMapping = new MappingToDTO(); //nHibernateToDomainMapping.MapAll(); //MappingToDomain domainToNHibernateMapping = new MappingToDomain(); //domainToNHibernateMapping.MapAll(); }
internal InterfaceICAGateway() { var applicationSessionManager = new ApplicationSessionManager(DataBaseConnectivity.Application); applicationSession = applicationSessionManager.Session; //MappingToDTO mappingToDTO = new MappingToDTO(); //mappingToDTO.MapAll(); //MappingToDomain mappingToDomain = new MappingToDomain(); //mappingToDomain.MapAll(); }
/// <summary> /// Commits and closes the NHibernate session provided by the supplied <see cref="NHibernateSessionManager"/>. /// Assumes a transaction was begun at the beginning of the request; but a transaction or session does /// not *have* to be opened for this to operate successfully. /// </summary> private void CommitAndCloseSession(object sender, EventArgs e) { this.applicationSessionManager = new ApplicationSessionManager(); this.applicationSessionManager.CommitAndCloseSession(); }
/// <summary> /// Opens a session within a transaction at the beginning of the HTTP request. Note that /// it ONLY begins transactions for those designated as being transactional i.e. isTransactional="true" in web.config. /// </summary> /// <param name="sender"></param> private void BeginTransaction(object sender, EventArgs e) { this.applicationSessionManager = new ApplicationSessionManager(); this.applicationSessionManager.BeginTransaction(); }