Пример #1
0
 public static IRepositoryQuery <TModel> FieldNotEqualsIf <TModel, TValue>(this IRepositoryQuery <TModel> query, Expression <Func <TModel, object> > objectPath, TValue value = default, bool condition = true) where TModel : class
 {
     return(condition ? query.FieldNotEquals(objectPath, value) : query);
 }
Пример #2
0
        public static IRepositoryQuery <TModel> FieldNotEqualsIf <TModel, TValue>(this IRepositoryQuery <TModel> query, Expression <Func <TModel, object> > objectPath, TValue value = default, Func <TValue, bool> condition = null) where TModel : class
        {
            bool result = condition == null || condition(value);

            return(result ? query.FieldNotEquals(objectPath, value) : query);
        }