private void HandleParameter(MethodCallExpression node)
        {
            if (node.HasParameterArgument())
            {
                if (containsNames.Contains(node.Method.Name))
                {
                    HandleContains(node);
                    return;
                }


                if (node.Method.Name == "InjectSql")
                {
                    HandleInject(node);
                    return;
                }

                _sb.Append(_provider.GetSql(node, new ExpressionSqlGenerator(_provider, _factory, _escape, Parameters)));
                return;
            }

            if (node.BelongsToParameter() && node.Object.Type.Is <string>())
            {
                HandleParamStringFunctions(node);
            }
        }
Beispiel #2
0
        private void HandleParameter(MethodCallExpression node)
        {
            if (node.HasParameterArgument())
            {
                if (node.Method.Name == "Contains")
                {
                    HandleContains(node);
                    return;
                }
                throw new NotSupportedException();
            }

            if (node.BelongsToParameter())
            {
                if (node.Object.Type == typeof(string))
                {
                    HandleParamStringFunctions(node);
                }
            }
        }