//[Test]
        public void MontaConexaoPostgreSQL()
        {
            JokeConfigurationBuilder.NewConfigurationToPostgreSQL()
                .BuildConfiguration();

            DbConnection connection = new DbConnectionFactory().Get();
            DbDataAdapter dbDataAdapter = new DbDataAdapterFactory(SQL, connection).Get();

            Assert.That(dbDataAdapter.GetType().ToString(), Is.EqualTo("Npgsql.NpgsqlDataAdapter"));
        }
        internal DataTable Generate()
        {
            DbConnection conn = new DbConnectionFactory().Get();
            conn.Open();

            DbDataAdapter adp = new DbDataAdapterFactory(commandSQL, conn).Get();
            DataTable dataTable = new DataTable();

            adp.Fill(dataTable);

            conn.Close();

            return dataTable;
        }
Esempio n. 3
0
        internal DataTable Generate()
        {
            DbConnection conn = new DbConnectionFactory().Get();

            conn.Open();

            DbDataAdapter adp       = new DbDataAdapterFactory(commandSQL, conn).Get();
            DataTable     dataTable = new DataTable();

            adp.Fill(dataTable);

            conn.Close();

            return(dataTable);
        }