A generic database class
This is a class I use frequently for running SQL commands / queries: public class Database : IDatabase { public Database ( DatabaseConfiguration config ) { this . config = config ; } public object [][] RunQuery ( string query , params object [] args ) { using ( var con = Connect ()) using ( var cmd = Prepare ( con , query , args )) return cmd . ExecuteReader () . Pipe ( ReadData ); } public void RunNonQuery ( string command , params object [] args ) { using ( var con = Connect ()) using ( var cmd = Prepare ( con , command , args )) cmd . ExecuteNonQuery (); } // private static readonly ITableReader TABLE_READER = new TableReader (); private readonly DatabaseConfiguration config ; private SqlConnection Connect () => new SqlConnection ( co