Is your feature request related to a problem? Please describe.
Yes, currently, the Query class has the Contains and StartsWith methods, but it lacks an EndsWith method. This limits the ability to efficiently query strings that should end with a specific value.
Describe the solution you'd like
I would like to see an EndsWith method added to the Query class, similar to the existing Contains and StartsWith methods. This would allow for more flexible string querying, particularly when checking for specific suffixes in a string.
Describe alternatives you've considered
- Using an expression directly: Find(x => x.Content.EndsWith("value"))
- Using a raw query string: $"$.Content LIKE {new BsonValue("%" + value)}"
While these alternatives are functional, they require more verbose and less intuitive code compared to having a built-in EndsWith method in the Query class.
Additional context
The addition of the EndsWith method would make string querying more complete and provide better support for common patterns where the end of the string matters.
Is your feature request related to a problem? Please describe.
Yes, currently, the
Queryclass has theContainsandStartsWithmethods, but it lacks anEndsWithmethod. This limits the ability to efficiently query strings that should end with a specific value.Describe the solution you'd like
I would like to see an
EndsWithmethod added to theQueryclass, similar to the existingContainsandStartsWithmethods. This would allow for more flexible string querying, particularly when checking for specific suffixes in a string.Describe alternatives you've considered
While these alternatives are functional, they require more verbose and less intuitive code compared to having a built-in
EndsWithmethod in theQueryclass.Additional context
The addition of the
EndsWithmethod would make string querying more complete and provide better support for common patterns where the end of the string matters.