I want to give the user the choice of searching by different properties. For instance
[INPUT TEXT] | [SELECT OPTION {ID, NAME, PHONE}] | [SEARCH]
And I would later build my query like this:
repository.Where(lambda-expression)
Where lambda-expression is build from the selected option {ID, NAME, PHONE}
(For example: x => x.NAME.Equals(INPUT TEXT))
Is there a way to build the lambda from the Property name perhaps using reflection?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…