public List<T> GetDataList<T>(string sql) { List<T> obj=new List<T>(); try { using (SQLiteConnection cnn = new SQLiteConnection(dbConnection)) { cnn.Open(); using (SQLiteCommand mycommand = new SQLiteCommand(sql, cnn)) { using (SQLiteDataReader reader = mycommand.ExecuteReader()) { obj = reader.CreateList<T>(); } cnn.Close(); } } } catch (Exception e) { } return obj; }