コード例 #1
0
        public override Expression <Func <DatabaseTest, bool> > ToExpression()
        {
            var types = QuestionTypeHelper.GetSupportedTypes();

            return(x => x.IsActive &&
                   x.TestThemes
                   .Select(y => y.Theme)
                   .SelectMany(y => y.Questions)
                   .Any(z => types.Contains(z.Type)));
        }
コード例 #2
0
        public override Expression <Func <DatabaseDiscipline, bool> > ToExpression()
        {
            var types = QuestionTypeHelper.GetSupportedTypes();

            return(x => x.Tests
                   .Where(y => y.IsActive)
                   .SelectMany(y => y.TestThemes)
                   .Select(y => y.Theme)
                   .SelectMany(y => y.Questions)
                   .Any(y => types.Contains(y.Type)));
        }
コード例 #3
0
        public override Expression <Func <DatabaseTheme, bool> > ToExpression()
        {
            var types = QuestionTypeHelper.GetSupportedTypes();

            return(x => x.Questions.Any(y => types.Contains(y.Type)) && x.ThemeTests.Any(y => y.Test.IsActive));
        }