Example #1
0
        /// <summary>
        /// Execute query and return results as a List
        /// </summary>
        public Task <List <T> > ToListAsync()
        {
            var tcs = new TaskCompletionSource <List <T> >();

            _liteDatabaseAsync.Enqueue(tcs, () => {
                tcs.SetResult(_wrappedQuery.ToList());
            });
            return(tcs.Task);
        }
 /// <summary>
 /// Execute query and return results as a List
 /// </summary>
 public Task <List <T> > ToListAsync()
 {
     return(_liteDatabaseAsync.EnqueueAsync(
                () => _wrappedQuery.ToList()));
 }