Пример #1
0
        public List <T> ListIOElements <T>(string tableName) where T : DatabaseItem, new()
        {
            string           sql     = "select * from " + tableName + " order by _rowid_ ASC";
            SQLiteDataReader reader  = SQLiteCommandsExecuter.executeDataReader(sql, DCore.M_dbConnection);
            List <T>         ioElems = ReaderToElements <T>(reader, tableName);

            return(ioElems);
        }
Пример #2
0
        public T GetElement <T>(int objectID, string tableName) where T : DatabaseItem, new()
        {
            string           sql    = "select * from " + tableName + " where (" + elementID + "=" + objectID + ")  order by _rowid_ ASC LIMIT 1";
            SQLiteDataReader reader = SQLiteCommandsExecuter.executeDataReader(sql, DCore.M_dbConnection);
            T Objects = ReaderToElement <T>(reader, tableName);

            return(Objects);
        }