We have an object
public class SomeObject
{
public Name {get;set;}
public City {get;set;}
public State {get;set}
//various other parameters. Let's say there's ~20
}
Is it possible to dynamically create new LINQ queries without recompilation of source code? Instead, the query parameters come from an XML structure that is stored and updated in the database.
var result = from i in someObj
where
//XML requests Name = 'Bob'...so append this where clause
name = 'Bob'
Can this be done?