private static Expression BuildCondition(ParameterExpression param, Filter filter, IDictionary <string, string> map = null, bool throwIfError = true) { try { var prop = param.CreatePropertyExpression(Utils.GetMappingPropertyName(filter.Property, map, throwIfError)); return(Interpreter.GetCondition(filter.Operator.GetOperator(), prop, filter.Value)); } catch (Exception ex) { throw new InvalidOperationException("An error occurs while building expression", ex); } }
internal static Expression BuildCondition(ParameterExpression param, Filter filter, BuildArgument arg) { var prop = param.CreatePropertyExpression(arg.MapProperty(filter.Property)); return(Interpreter.BuildBody(filter.Operator.GetComparisonOperator(), prop, filter.Value, arg.VariableResolver)); }