-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Hi,
i have the following method:
public string GetQuery(params Expression<Func<MyClass, object>>[] properties){}
so i able to use it this way:
GetQuery(x => x.FirstName, x => x.NestedProp.NestedValue);
how can i map the properties array to a valid IQuery?
tried the following:
foreach (var property in properties)
{
if (property.Body is MemberExpression)
{
// this works for MemberExpressions only
query.AddField(property);
}
else
{
// here i have to handle nested expressions "x.NestedProp.NestedValue"
// i'm not sure how to map the UnaryExpression to the query
}
}
can someone please give me a hint?
thanks in advanced
Metadata
Metadata
Assignees
Labels
No labels