Example #1
0
        Expression <Func <TEntity, bool> > GetWhereExpression(CriteriaOperator criteria)
        {
            var caseInsensitiveCriteria = Data.Helpers.StringsTolowerCloningHelper.Process(criteria);

            return(this.IsInDesignMode()
                ? CriteriaOperatorToExpressionConverter.GetLinqToObjectsWhere <TEntity>(caseInsensitiveCriteria)
                : CriteriaOperatorToExpressionConverter.GetGenericWhere <TEntity>(caseInsensitiveCriteria));
        }
Example #2
0
 internal static Expression <Func <TEntity, bool> > GetFilterExpression(CriteriaOperator criteria)
 {
     try {
         return(CriteriaOperatorToExpressionConverter.GetGenericWhere <TEntity>(criteria));
     }
     catch (Exception e) {
         throw new NotSupportedException("Error in Filter:" + CriteriaOperator.ToString(criteria), e);
     }
 }
Example #3
0
        void UpdateFilterExpression()
        {
            ISupportFiltering <TEntity> viewModel = this.viewModel as ISupportFiltering <TEntity>;

            if (viewModel != null && ActiveFilterItem != null)
            {
                viewModel.FilterExpression = CriteriaOperatorToExpressionConverter.GetGenericWhere <TEntity>(ActiveFilterItem.FilterCriteria);
            }
        }
 Expression <Func <TEntity, bool> > GetWhereExpression(CriteriaOperator criteria)
 {
     return(this.IsInDesignMode()
         ? CriteriaOperatorToExpressionConverter.GetLinqToObjectsWhere <TEntity>(criteria)
         : CriteriaOperatorToExpressionConverter.GetGenericWhere <TEntity>(criteria));
 }
Example #5
0
 int GetEntityCount(CriteriaOperator criteria)
 {
     return(entities.Where(CriteriaOperatorToExpressionConverter.GetGenericWhere <TEntity>(criteria)).Count());
 }