I'm trying to inject some inline work as a Statement Lambda into a LINQ query select
like so...
// NOTE: mcontext.Gettype() == System.Data.Linq.DataContext
// Okay - compiles, nothing unusual
var qPeople1 = from ME.tblPeople person in mcontext.tblPeoples
select person;
// ERROR - see below compile Error - Can I retrofit this thing?
var qPeople2 = from ME.tblPeople person in mcontext.tblPeoples
select (() => {
return person;
})();
Error:
Error 2 Method name expected file.cs 166 27 MigrationCore
... however I'd also be equally happy to see an Expression Lambda work inline first.
Note: I know the code sample is redundant in its effort but I'm looking for the basic concept. If it's workable I will be expanding it.