List<xDTO>.RunSelect vs xCollection.RunSelect

May 5, 2010 at 11:40 PM
Edited May 6, 2010 at 12:59 AM

I'm bumbling my way through using nHydrate. I have a WPF desktop app consuming the generated DataService. I'm trying to do some RunSelects with LINQ syntax but the DTO objects don't recognise it. All the Runselect examples on this site use collection objects, but the DTO runselect is diffent (it only accepts a string) and nothing I try works .

Can anyone give me syntax examples of using a DTO's RunSelect? 

Clarification: I'm assuming my syntax is incorrect. It's actually bombing out in the DALProxy List RunSelect with "Error Compiling Expression: Error Compiling Expression: Metadata file 'System.Core.dll' could not be found\n". Given that every proj references System.Core and it's, well, core, I believe the problem is with the "error compiling expression" rather than "system.core could not be found"...


Further Clarification: Looks like I'm not the first to run into this:

Was it every resolved? I'm running Windows 7- could that be a factor?

May 6, 2010 at 10:25 PM

I can't remember what I've changed (I've tried everything up to and including deleting all the projects and regenerating), but I've got it working with the WCF proxy.

Syntax seems to be identical but in a literal string. I'm sure I tried this yesterday and it didn't work, but for anyone who needs an example:


List<DudeDTO> People = new List<DudeDTO>();            

People .RunSelect("x => x.Surname.Equals(" + (char)34 + "Skywalker" + (char)34 + ")");             

PeopleDatagrid.ItemsSource = People;