System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.CreateCollectionOfRowResultType(System.Collections.Generic.List)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.CreateCollectionOfRowResultType(System.Collections.Generic.List) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

1. Example

View license
internal static TypeUsage ValidateApply(DbExpressionBinding input, DbExpressionBinding apply)
        {
            ValidateBinding(input, "input");
            ValidateBinding(apply, "apply");

            //
            // Duplicate Input and Apply binding names are not allowed
            //
            if (input.VariableName.Equals(apply.VariableName, StringComparison.Ordinal))
            {
                throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Apply_DuplicateVariableNames);
            }

            //
            // Initialize the result type
            //
            List<KeyValuePair<string, TypeUsage>> recordCols = new List<KeyValuePair<string, TypeUsage>>();
            recordCols.Add(new KeyValuePair<string, TypeUsage>(input.VariableName, input.VariableType));
            recordCols.Add(new KeyValuePair<string, TypeUsage>(apply.VariableName, apply.VariableType));

            return CreateCollectionOfRowResultType(recordCols);
        }

2. Example

View license
internal static TypeUsage ValidateJoin(DbExpressionBinding left, DbExpressionBinding right, DbExpression joinCondition)
        {
            //
            // Validate
            //
            ValidateBinding(left, "left");
            ValidateBinding(left, "right");
            EntityUtil.CheckArgumentNull(joinCondition, "joinCondition");

            //
            // Duplicate Left and Right binding names are not allowed
            //
            if (left.VariableName.Equals(right.VariableName, StringComparison.Ordinal))
            {
                throw EntityUtil.Argument(System.Data.Entity.Strings.Cqt_Join_DuplicateVariableNames);
            }

            //
            // Validate the JoinCondition)
            //
            RequireCompatibleType(joinCondition, PrimitiveTypeKind.Boolean, "joinCondition");
            
            //
            // Initialize the result type
            //
            List<KeyValuePair<string, TypeUsage>> columns = new List<KeyValuePair<string, TypeUsage>>(2);
            columns.Add(new KeyValuePair<string, TypeUsage>(left.VariableName, left.VariableType));
            columns.Add(new KeyValuePair<string, TypeUsage>(right.VariableName, right.VariableType));

            return CreateCollectionOfRowResultType(columns);
        }

3. Example

View license
internal static TypeUsage ValidateGroupBy(DbGroupExpressionBinding input, IEnumerable<KeyValuePai/n ..... /n //View Source file for more details /n }

4. Example

View license
internal static System.Collections.ObjectModel.ReadOnlyCollection<DbExpressionBinding> Validat/n ..... /n //View Source file for more details /n }