/// <summary> /// Returns first document of resultset /// </summary> public Task <T> FirstAsync() { var tcs = new TaskCompletionSource <T>(); _liteDatabaseAsync.Enqueue(tcs, () => { tcs.SetResult(_wrappedQuery.First()); }); return(tcs.Task); }
/// <summary> /// Returns first document of resultset /// </summary> public Task <T> FirstAsync() { return(_liteDatabaseAsync.EnqueueAsync( () => _wrappedQuery.First())); }