Пример #1
0
        protected override Expression VisitConstant(ConstantExpression node)
        {
            // TODO add other supported types
            if (node.Type == typeof(int) || node.Type == typeof(string))
            {
//                var typeName = $"{_sqlGenerationHelper.DelimitIdentifier(_entityType.Relational().TableName)}.{_sqlGenerationHelper.DelimitIdentifier(_currentAssignmentColumnName)}%TYPE";
                var typeName      = _currentAssignmentColumnType;
                var parameterName = _statementBuilder.AddParameter(node.Value, typeName);

//                _statementBuilder.Append(parameterName);
                _statementBuilder.Append($"@{parameterName}");
                //_statementBuilder.DelimitIdentifier(parameterName);
                return(node);
            }

            throw new NotSupportedException();
        }