示例#1
0
 private IWhereBuilder CheapCarCondition(IWhereBuilderFactory factory)
 {
     return(factory.And(
                f => f.Compare(c => c.Compare <Car>(car => car.Mileage).With(Operators.LT, CHEAPCAR_MILEAGE)),
                f => f.Compare(c => c.Compare <Car>(car => car.Price).With(Operators.LT, CHEAPCAR_PRICE))
                ));
 }
示例#2
0
 private IWhereBuilder SweetSpotLexusCondition(IWhereBuilderFactory factory)
 {
     return(factory.And(
                f => f.Compare(c => c.Compare <Car>(car => car.ModelYear).With(Operators.GT, LEXUS_YEAR)),
                f => f.Compare(c => c.Compare <Car>(car => car.Mileage).With(Operators.LT, LEXUS_MILEAGE)),
                f => f.Compare(c => c.Compare <Car>(car => car.Price).With(Operators.LTE, LEXUS_PRICE)),
                f => f.Compare(c => c.Compare <CarMaker>(maker => maker.Name).With(Operators.LIKE, LEXUS_BRAND))
                ));
 }