-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.6.1
-
Component/s: None
-
None
We were using the .OrderBy extension method with a custom Expression. The Mongo driver seems to strip out the `Convert(...)` that the C# compiler adds (to box value types to reference types). i.e.
Expression<Func<TModel, DateTime>> sortExpression = m => m.UploadDate;
var query = collection.AsQueryable().OrderBy(sortExpression);
query.ToList(); // <-- fails
Pull request is following, on Github.
- related to
-
CSHARP-634 Over-eager expression tree normalization for assignable types
- Closed