public IList <FilteringExpression> GetFilteringExpressionsByExternalRepository(int externalRepositoryId)
        {
            FilteringExpressionSet setAlias        = null;
            ExternalRepository     repositoryAlias = null;

            return(GetSession().QueryOver <FilteringExpression>()
                   .JoinAlias(x => x.FilteringExpressionSet, () => setAlias)
                   .JoinAlias(() => setAlias.ExternalRepositories, () => repositoryAlias)
                   .Where(() => repositoryAlias.Id == externalRepositoryId)
                   .OrderBy(x => x.Id).Asc
                   .List());
        }
        protected override int ExecuteWorkImplementation()
        {
            var bibliographicFormat = m_filteringExpressionSetRepository.Load <BibliographicFormat>(m_data.BibliographicFormat.Id);
            var user = m_filteringExpressionSetRepository.Load <User>(m_userId);

            var filteringExpressionSet = new FilteringExpressionSet
            {
                Name                = m_data.Name,
                CreatedByUser       = user,
                BibliographicFormat = bibliographicFormat,
            };

            filteringExpressionSet.FilteringExpressions = m_data.FilteringExpressions.Select(x => new FilteringExpression
            {
                Field = x.Field, Value = x.Value, FilteringExpressionSet = filteringExpressionSet
            }).ToList();

            var resultId = (int)m_filteringExpressionSetRepository.Create(filteringExpressionSet);

            return(resultId);
        }