Ejemplo n.º 1
0
        public static PredicateBinding BindAs(this Predicate input, string varName)
        {
            Check.NotNull(input, "input");
            Check.NotNull(varName, "varName");
            Check.NotEmpty(varName, "varName");

            CollectionType collectionType = input.ResultType.EdmType as CollectionType;

            if (collectionType == null)
            {
                throw new Exception();
            }
            var inputRef = new VariableReferencePredicate(collectionType.TypeUsage, varName);

            return(new PredicateBinding(input, inputRef));
        }
Ejemplo n.º 2
0
 internal PredicateBinding(Predicate input, VariableReferencePredicate varRef)
 {
     _predicate = input;
     _varRef    = varRef;
 }