- 
    Type:Bug 
- 
    Resolution: Unresolved
- 
    Priority:Unknown 
- 
    None
- 
    Affects Version/s: None
- 
    Component/s: None
- 
    None
- 
        None
- 
        Dotnet Drivers
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
- 
        None
Driver failed to translate an expression containing string.Compare call by throwing 
ExpressionNotSupportedException.
Code to reproduce the problem:
[Fact] public void String_Compare_should_work() { var collection = Fixture.Collection; var queryable = collection.AsQueryable() .Where(d => string.Compare(d.Key, "a4e48b55-0519-4ab3-b6b9-7c532fc65b56") > 0); var stages = Translate(collection, queryable); AssertStages(stages, "{ $match: { _id: { $gt: 'a4e48b55-0519-4ab3-b6b9-7c532fc65b56' }, }, }"); var result = queryable.ToList(); result.Should().HaveCount(1); } public class C { public string Key { get; set; } } public sealed class ClassFixture : MongoCollectionFixture<C> { protected override IEnumerable<C> InitialData => [ new C { Key = "1b2bc240-ec2a-4a17-8790-8407e3bbb847"}, new C { Key = "a4e48b55-0519-4ab3-b6b9-7c532fc65b56"}, new C { Key = "9ff72c5d-189e-4511-b7ad-3f83489e4ea4"}, new C { Key = "d78ca958-abac-46cd-94a7-fbf7a2ba683d"}, ]; }
- blocks
- 
                    ODATA-40 ExpressionNotSupportedException: Expression not supported: Compare(Convert($it.MyId, String), "c49d8006-edaf-11ee-a98e-0a58ac1f12aa") when using nextLink -         
- Blocked
 
-