/// <summary> /// Finds all topics by the predicate /// </summary> /// <param name="predicates">Predicate</param> /// <returns>Theme collection</returns> public IEnumerable <BllTheme> GetAllByPredicate(Expression <Func <BllTheme, bool> > predicates) { var visitor = new PredicateExpressionVisitor <BllTheme, DalTheme>(Expression.Parameter(typeof(DalTheme), predicates.Parameters[0].Name)); var exp = Expression.Lambda <Func <DalTheme, bool> >(visitor.Visit(predicates.Body), visitor.NewParameter); return(themeRepository.GetAllByPredicate(exp).Select(theme => theme.ToBllTheme()).ToList()); }