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

LTE() public static method

Tests that the value of the named element is less than or equal to some value (see $lte).
public static LTE ( 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 LTE(string name, BsonValue value)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (value == null)
            {
                throw new ArgumentNullException("value");
            }
            return new QueryConditionList(name).LTE(value);
        }

Usage Example

        public void TestLessThanOrEqualAndNotEquals()
        {
            var query    = Query.LTE("k", 10).NE(5);
            var expected = "{ \"k\" : { \"$lte\" : 10, \"$ne\" : 5 } }";

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