Example #1
0
        public void OutputQueryToCsv()
        {
            ICsvWriter csv     = CsvWriter.Create(path: _root + "output_from_table.csv", queryString: "SELECT * FROM dbo.TestTable", connectionString: _connectionString);
            bool       success = csv.OutputToCsv();
            string     error   = csv.Error;

            csv.Dispose();

            if (error != null)
            {
                throw new Exception(error);
            }

            Assert.IsTrue(success);
        }