System.Data.Common.CommandTrees.DbExpression.Bind()

Here are the examples of the csharp api class System.Data.Common.CommandTrees.DbExpression.Bind() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

Project: referencesource
Source File: ITreeGenerator.cs
private DbFilterExpression CreateIsOfFilterExpression(DbExpression input, IsOfFilter typeFilter)
        {
            // Create a filter expression based on the IsOf/IsOfOnly operations specified by typeFilter
            DbExpressionBinding resultBinding = input.Bind();
            List<DbExpression> predicates = new List<DbExpression>(
                typeFilter.ToEnumerable().Select(tf => tf.Value ? resultBinding.Variable.IsOfOnly(tf.Key) : resultBinding.Variable.IsOf(tf.Key)).ToList()
            );
            DbExpression predicate = Helpers.BuildBalancedTreeInPlace(predicates, (left, right) => left.And(right));
            DbFilterExpression result = resultBinding.Filter(predicate);

            // Track the fact that this IsOfFilter was created by the ITreeGenerator itself and should
            // simply be converted to an ITree Node when it is encountered again by the visitor pass.
            _processedIsOfFilters.Add(result);
            return result;
        }

2. Example

Project: referencesource
Source File: Sql8ExpressionRewriter.cs
private DbExpressionBinding CapWithProject(DbExpressionBinding inputBinding, IList<DbPropertyExpr/n ..... /n //View Source file for more details /n }

3. Example

Project: referencesource
Source File: Sql8ExpressionRewriter.cs
private DbExpression TransformIntersectOrExcept(DbExpression left, DbExpression right, DbExpressionK/n ..... /n //View Source file for more details /n }

4. Example

Project: referencesource
Source File: ITreeGenerator.cs
private DbExpression ApplyIsOfFilter(DbExpression current, IsOfFilter typeFilter)
        {
        /n ..... /n //View Source file for more details /n }