Exemple #1
0
        public void UploadTable_SetupSource()
        {
            var data           = CreateTable("Pre", 60000);
            var manifestObject = GetJsonFile <DatabaseJobManifest>(_inputRoot, "database.manifest.xepdb1.json");
            var table          = manifestObject.manifest.tables[0];

            table.temp_name = table.qualified_table_name; //initializing Table-TempName with Person Table

            var target = new OracleSqlWriter();

            target.ExecuteSqlText(connectionString, new List <string> {
                $"truncate table {table.temp_name}"
            });                                                                    // Cleaning the Person Table first before adding these records with data

            var outputnoOfRecord = target.BulkCopy(connectionString, table, data); // This call should copy records from data to Persons directly.

            data.Rows.Count.Should().Be(outputnoOfRecord);
        }