We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 533fe3e commit e998575Copy full SHA for e998575
src/MongoDB.Driver/SortDefinitionBuilder.cs
@@ -308,12 +308,12 @@ public ValueDirectionalSortDefinition(SortDirection direction)
308
_direction = direction;
309
}
310
311
- internal override BsonValue RenderAsBsonValue(RenderArgs<TDocument> args) => _direction.Render();
312
-
313
public override BsonDocument Render(RenderArgs<TDocument> args)
314
{
315
throw new InvalidOperationException(
316
"Value-based sort cannot be rendered as a document. You might be trying to use a value-based sort where a field-based sort is expected.");
317
+
+ internal override BsonValue RenderAsBsonValue(RenderArgs<TDocument> args) => _direction.Render();
318
319
0 commit comments