Beispiel #1
0
        /// <summary>
        /// Creates the temprorary table.
        /// </summary>
        private void CreateTemproraryTable()
        {
            var builder = new CreateTableCommandBuilder(_connection.Factory);

            builder.TableName = TableName;

            foreach (PropertyInfo field in _fields)
            {
                builder.AddColumn(field.Name, field.PropertyType);
            }
            _connection.ExecuteNonQuery(builder.Build());
        }
Beispiel #2
0
        private SendParameter PreparePrimitive(Type parameterType)
        {
            var builder = new CreateTableCommandBuilder(_connection.Factory)
            {
                TableName = TableName
            };

            builder.AddColumn("value", parameterType);
            _connection.ExecuteNonQuery(builder.Build());

            var builderInsert = new InsertCommandBuilder(_connection.Factory)
            {
                TableName = TableName
            };

            builderInsert.AddParameter("value", parameterType);
            _insertCommand = builderInsert.Build();
            //insertCommand.Prepare();

            return(SendPrimitive);
        }