Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.RequireCompatibleType(System.Data.Common.CommandTrees.DbExpression, System.Data.Metadata.Edm.PrimitiveTypeKind, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
0
1. Example
View licenseinternal static TypeUsage ValidateLike(DbExpression argument, DbExpression pattern) { EntityUtil.CheckArgumentNull(argument, "argument"); EntityUtil.CheckArgumentNull(pattern, "pattern"); RequireCompatibleType(argument, PrimitiveTypeKind.String, "argument"); RequireCompatibleType(pattern, PrimitiveTypeKind.String, "pattern"); return _booleanType; }
0
2. Example
View licenseinternal static TypeUsage ValidateQuantifier(DbExpressionBinding input, DbExpression predicate) { ValidateBound(input, predicate, "predicate"); RequireCompatibleType(predicate, PrimitiveTypeKind.Boolean, "predicate"); return predicate.ResultType; }
0
3. Example
View licenseinternal static TypeUsage ValidateFilter(DbExpressionBinding input, DbExpression predicate) { ValidateBound(input, predicate, "predicate"); RequireCompatibleType(predicate, PrimitiveTypeKind.Boolean, "predicate"); return input.Expression.ResultType; }
0
4. Example
View licenseinternal static TypeUsage ValidateLike(DbExpression argument, DbExpression pattern, DbExpression escape) { TypeUsage resultType = ValidateLike(argument, pattern); EntityUtil.CheckArgumentNull(escape, "escape"); RequireCompatibleType(escape, PrimitiveTypeKind.String, "escape"); return resultType; }
0
5. Example
View licenseinternal 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); }