Ejemplo n.º 1
0
        public Task <CountResponse> CountAsync <TDocument>(Action <CountRequestDescriptor <TDocument> > configureRequest = null, CancellationToken cancellationToken = default)
        {
            var descriptor = new CountRequestDescriptor <TDocument>();

            configureRequest?.Invoke(descriptor);
            descriptor.BeforeRequest();
            return(DoRequestAsync <CountRequestDescriptor <TDocument>, CountResponse>(descriptor));
        }
Ejemplo n.º 2
0
        public CountResponse Count <TDocument>(Action <CountRequestDescriptor <TDocument> > configureRequest = null)
        {
            var descriptor = new CountRequestDescriptor <TDocument>();

            configureRequest?.Invoke(descriptor);
            descriptor.BeforeRequest();
            return(DoRequest <CountRequestDescriptor <TDocument>, CountResponse>(descriptor));
        }