IQueryDocumentsService interface


Provides method for searching documents.

public interface IQueryDocumentsService

Methods

This methods is responsable for querying documents by custom criteria restrictions.
Use QueryBuilder>() for creating your critera restriction.
Check Document.

CollectionResult<Document<TDocumentType>> Search<TDocumentType>(IRestriction<DocumentsQuery<TDocumentType>> restriction);

Examples

Search for documents

You can perform detailed search by using QueryBuilder:

 var restriction = new QueryBuilder<DocumentsQuery<MyDocumentType>>()
                .LessOrEqual(document => document.Data.Value, (double)100)
                .OrderByDescending(document => document.Data.Name)
                .ApplyPaging(0, 10);

service.Collection("myCollection").Search(restriction);

results matching ""

    No results matching ""