Example #1
0
        public async Task <IReadOnlyCollection <T> > ReadRecordsAsync <T>(SqlQuery <T> query)
        {
            return(await ReadQueryAsync(query, reader =>
            {
                SqlMap <T> map = GetMap <T>();
                List <T> records = new List <T>();
                while (reader.Read())
                {
                    T record = map.Read(reader);
                    records.Add(record);
                }

                return records;
            }));
        }