public OdooQuery <T> Where <TForeignKeyLevel1>(Expression <Func <T, long?> > expression, Expression <Func <TForeignKeyLevel1, object> > expressionForeignKeyLevel1, OdooOperator odooOperator, object value) where TForeignKeyLevel1 : IOdooModel, new() { var fields = OdooExtensions.GetOdooPropertyName <T>(OdooExpresionMapper.GetPropertyName(expression)) + '.' + OdooExtensions.GetOdooPropertyName <TForeignKeyLevel1>(OdooExpresionMapper.GetPropertyName(expressionForeignKeyLevel1)); Filters.Add(new OdooFilter { fields, odooOperator.Description(), value }); return(this); }
public static OdooFilter ToOdooExpresion <T>(string propertyname, OdooOperator odooOperator, object value) where T : IOdooModel, new() { return(new OdooFilter { OdooExtensions.GetOdooPropertyName <T>(propertyname), odooOperator.Description(), value }); }