示例#1
0
        public List <DatabaseRecord> GetAllRecords()
        {
            // NO NO NO!  We could never do this because it would take up to 1000ms * 2000 records to finish.
            // Plus, it'll be too big to handle.  Giggity.
            List <DatabaseRecord> result = new List <DatabaseRecord>();
            int count = _service.GetDatabaseRecordCount();

            for (int j = 0; j < count; j++)
            {
                Console.WriteLine($"Fetched record {j} of {count}.");
                result.Add(_service.GetDataBaseRecordByID(j));
            }
            return(result);
        }