Beispiel #1
0
        public void ResolveWhere <T>(bool and, bool pre, Expression <Func <T, bool> > expression)
        {
            if (expression == null)
            {
                return;
            }
            builder.PartType = SqlPartType.Where;
            if (pre)
            {
                builder.BeginExpression();
            }
            else
            {
                if (and)
                {
                    builder.And();
                }
                else
                {
                    builder.Or();
                }
            }
            var node = this.Visit((dynamic)expression.Body);

            builder.BuildWhere(node);
        }
        public void ResolveWhere <T>(Expression <Func <T, bool> > expression)
        {
            builder.TableType = typeof(T);
            builder.PartType  = SqlPartType.Where;
            var node = ResolveQuery((dynamic)expression.Body);

            builder.BuildWhere(node);
        }
        public void ResolveWhereField <T, TKey, TSource>(Expression <Func <T, TKey> > expression, TSource obj, bool andOr)
        {
            SetBuilder <T>(SqlTextType.None, SqlPartType.Where);
            var node = this.Visit(expression.Body);

            builder.BuildWhere((dynamic)node, obj, andOr);
        }
Beispiel #4
0
        public void ResolveWhereField <T, TKey, TSource>(Expression <Func <T, TKey> > expression, TSource obj, bool andOr)
        {
            this.resolveType  = typeof(T);
            builder.PartType  = SqlPartType.Where;
            builder.TableType = resolveType;
            var nodes = ResolveField(expression.Body);

            builder.BuildWhere(nodes, obj, andOr);
        }