public IList<User> GetPollAdministratorsNotInUsersGroup(String username)
 {
     var clientCodeRepository = new ClientCodeRepository(session);
     var owner = from item in session.Query<User>()
                 where item.UserName == username
                 select item;
     var users = from item in session.Query<User>()
                 where item.Roles.Contains(new Role("Poll Administrator"))
                 && item.UserName != username
                 && item.IsDeleted == false
                 && !item.ClientCodes.Contains(clientCodeRepository.GetClientCodeByUserName(username))
                 select item;
     return users.ToList<User>();
 }
 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);
 }