System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Parameter(System.Data.Metadata.Edm.TypeUsage, string)

Here are the examples of the csharp api class System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Parameter(System.Data.Metadata.Edm.TypeUsage, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

View license
public override DbExpression Visit(DbParameterReferenceExpression expression)
        {
            EntityUtil.CheckArgumentNull(expression, "expression");

            return VisitTerminal(expression, newType => CqtBuilder.Parameter(newType, expression.ParameterName));
        }

2. Example

View license
internal override CqtExpression Translate(ExpressionConverter parent, MethodCallExpression call)
                {
                    DbExpression argument = parent.TranslateExpression(call.Arguments[0]);
                    DbExpression recreatedArgument;
                    TypeUsage updatedType = argument.ResultType.ShallowCopy(new FacetValues { Unicode = _isUnicode });

                    switch (argument.ExpressionKind)
                    {
                        case DbExpressionKind.Constant:
                            recreatedArgument = DbExpressionBuilder.Constant(updatedType, ((DbConstantExpression)argument).Value);
                            break;
                        case DbExpressionKind.ParameterReference:
                            recreatedArgument = DbExpressionBuilder.Parameter(updatedType, ((DbParameterReferenceExpression)argument).ParameterName);
                            break;
                        case DbExpressionKind.Null:
                            recreatedArgument = DbExpressionBuilder.Null(updatedType);
                            break;
                        default:
                            throw EntityUtil.NotSupported(System.Data.Entity.Strings.ELinq_UnsupportedAsUnicodeAndAsNonUnicode(call.Method));
                    }
                    return recreatedArgument;
                }

3. Example

Project: referencesource
Source File: CTreeGenerator.cs
View license
private DbExpression ResolveVar(Var referencedVar)
        {
            DbExpression retExpr = null/n ..... /n //View Source file for more details /n }