Skip to content

Support for .Trim() .ToLower() and any methods on typeof(string)

Latest
Compare
Choose a tag to compare
@dlebee dlebee released this 27 Apr 17:17

You can now use .ToLower() .Trim() or any methods

[TestMethod]
public void EqualLowerCase()
{
    // subject.
    var authors = new List<Author>()
    {
        new Author { Id = long.MaxValue, FirstName = "David", LastName = "Lebee" }
    };

    // the query.
    var query = authors.AsQueryable();

    // simple where.
    var newQuery = query.Where("FirstName.ToLower()", ConditionOperators.Equal, "david");

    // must match.
    Assert.IsTrue(newQuery.Any(), "Must have at least one author that matches");
}