Пример #1
0
        public static IQueryable <TSource> XWhere <TSource>(this IQueryable <TSource> @this, Func <WhereHelperQ <TSource>, WhereExp <TSource> > build)
        {
            var helper = new WhereHelperQ <TSource>(@this);
            var exp    = build(helper).Exp;

            return(@this.Where(exp));
        }
Пример #2
0
        public static IQueryable <TSource> XWhere <TSource>(this IQueryable <TSource> @this, Func <WhereHelperQ <TSource>, WhereExp <TSource> > build)
        {
            var helper   = new WhereHelperQ <TSource>(@this);
            var whereExp = build(helper);

            if (whereExp?.Exp != null)
            {
                return(@this.Where(whereExp.Exp));
            }
            else
            {
                return(@this);
            }
        }