Help with LINQ-where?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
Just trying to do a simple select on my custom object.

GridView2.DataSource = from jobs in new ifc.JobManagerFactory().GetByBPT(2355)
//where jobs.JobID =
"12"
orderby jobs.JobID
select new {
jobs.HostIP,
jobs.JobID
};

I get an error if I use where jobs.JobID = "12", it says:
"Error 25 Argument '2': cannot convert from 'anonymous method' to
'System.Query.Func

Where should I place my whereclause then?

Kind regards
Janus
 
Bobstar said:
Just trying to do a simple select on my custom object.

GridView2.DataSource = from jobs in new ifc.JobManagerFactory().GetByBPT(2355)
//where jobs.JobID =
"12"
orderby jobs.JobID
select new {
jobs.HostIP,
jobs.JobID
};

I get an error if I use where jobs.JobID = "12", it says:
"Error 25 Argument '2': cannot convert from 'anonymous method' to
'System.Query.Func

Where should I place my whereclause then?

What happens when you use '==' instead of '='?

-- Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top