I am trying to pass a Linq object property that will be used by my method. I can easily pass property to request
Func<Entities.MyEntity, ResultType> GetProperty = ent => ent.Property;
However, this returns a ResultType and cannot be used to set the property.
I thought about using reflection to get the Info property, but that would allow me to get the property, but then I cannot use Linq syntax to call my property. Is there a guru who knows how to do this?
I have a hunch that I can do this by building a piece of the expression tree and applying it to the query ...
I really hoped to do something like:
var value = myQueryEntity.CallMagicFunction();
myQueryEntity.CallMagicFunction() = value;
source
share