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