MongoDB.Driver.Builders.DeprecatedQuery.LT C# (CSharp) Method

LT() public static method

Tests that the value of the named element is less than some value (see $lt).
public static LT ( string name, BsonValue value ) : QueryConditionList
name string The name of the element to test.
value BsonValue The value to compare to.
return QueryConditionList
        public static QueryConditionList LT(string name, BsonValue value)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }
            return new QueryConditionList(name).LT(value);
        }

Usage Example

        public void TestLessThan()
        {
            var query    = Query.LT("k", 10);
            var expected = "{ \"k\" : { \"$lt\" : 10 } }";

            Assert.AreEqual(expected, query.ToJson());
        }
All Usage Examples Of MongoDB.Driver.Builders.DeprecatedQuery::LT