public ApplicationController(ISession session)
 {
     this.session = session;
     this.transaction = session.BeginTransaction();
     this.clientCodeRepository = new ClientCodeRepository(session);
     this.entityRepository = new EntityRepository(session);
     this.fieldsTemplateRepository = new FieldsTemplateRepository(session);
     this.messageRepository = new MessageRepository(session);
     this.participantRepository = new ParticipantRepository(session);
     this.pollRepository = new PollRepository(session);
     this.questionRepository = new QuestionRepository(session);
     this.reportRepository = new ReportRepository(session);
     this.responseRepository = new ResponseRepository(session);
     this.roleRepository = new RoleRepository(session);
     this.templateRepository = new TemplateRepository(session);
     this.userRepository = new UserRepository(session);
 }
 private IList<Entity> getChildEntites()
 {
     var entityRepository = new EntityRepository(NHibernateHelper.GetCurrentSession());
     return entityRepository.GetEndEntities(poll.pollID);
 }