LINQ ~ where clause example

dynamic labor = ctx.Qoo.Where(l => l.xxxID== xxxID).Select(l => l).ToList().Select(l =>
{
dynamic aaa = new ExpandoObject();
aaa.ooo= l.ooo;
aaa.yyy= l.yyy;
aaa.hhh= l.hhh;
return aaa;
}).ToArray();

reference
http://stackoverflow.com/questions/8663897/why-is-linq-wherepredicate-first-faster-than-firstpredicate

沒有留言: