Пример #1
0
        /// <summary>
        /// Execute Count method in filter query
        /// </summary>
        public Task <int> CountAsync()
        {
            var tcs = new TaskCompletionSource <int>();

            _liteDatabaseAsync.Enqueue(tcs, () => {
                tcs.SetResult(_wrappedQuery.Count());
            });
            return(tcs.Task);
        }
Пример #2
0
 /// <summary>
 /// Execute Count method in filter query
 /// </summary>
 public Task <int> CountAsync()
 {
     return(_liteDatabaseAsync.EnqueueAsync(
                () => _wrappedQuery.Count()));
 }