Method SortBy
SortBy<TDocument, TProjection>(IFindFluent<TDocument, TProjection>, Expression<Func<TDocument, object>>)
Sorts the results by an ascending field.
public static IOrderedFindFluent<TDocument, TProjection> SortBy<TDocument, TProjection>(this IFindFluent<TDocument, TProjection> find, Expression<Func<TDocument, object>> field)
Parameters
findIFindFluent<TDocument, TProjection>The fluent find.
fieldExpression<Func<TDocument, object>>The field.
Returns
- IOrderedFindFluent<TDocument, TProjection>
The fluent find interface.
Type Parameters
TDocumentThe type of the document.
TProjectionThe type of the projection (same as TDocument if there is no projection).