Dynamic LINQ Query in LINQ to Entities , problem with WHERE clause?

I don't think you're able to specify the property name ( ItemName ) as a parameter ( 0 ). Try this instead: tempData= from a in dx. SomeTable select a; string searchField="ItemName"; string searchString="BoxPkg"; object parameters=new object{searchString}; tempData = tempData.

Where(searchField + " like @0", parameters).

I don't think you're able to specify the property name (ItemName) as a parameter (@0). Try this instead: tempData= from a in dx. SomeTable select a; string searchField="ItemName"; string searchString="BoxPkg"; object parameters=new object{searchString}; tempData = tempData.

Where(searchField + " like @0", parameters).

Nopes. Still the same error mate :| – Sandeep Aug 24 '10 at 7:19.

I am trying query an xml file with dinamyc linq query. But I have a problem to make the where clause. This is the scenario.

The idea is to query the xml using a filter with sex and name. XDocument doc = XDocument. Var query = doc.

I use this method because with SelectSingleNode() method I have problem if the parameter in where clause are not ordered and because the query is dynamic. I don't know is syntax are correct, and if is the right way to make a dynamic query. I have not found example in internet with xml query.

Thx for any response!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions


Thank You!
send