Esempio n. 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))
                ));
 }
Esempio n. 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))
                ));
 }
Esempio n. 3
0
 private IWhereBuilder CountryCondition(IWhereBuilderFactory factory)
 {
     return(factory.Compare(c => c.Compare <Country>(country => country.Name).With(Operators.LIKE, "Germany")));
 }