It's late, so this must be something stupid. I have LinqPad connected up to my database and cannot seem to get results for the simplest of queries.
var q = from app in AppInstances select new { AppId = app.AppId };
When I run that, LinqPad says that it executed successfully (C#Statement mode). Nothing is retured.
I can write the following very simple Lambda (C# expression mode):
AppInstances.Select (p => p.AppId)
And that works. Why? I would prefer to use the non-lambda query building functionality. I am sure that this is something all together silly.
I would expect that in statement mode, you'd have to do something like call q.Dump();
to see the results.
But if you just want to use query expressions, why not do that from expression mode? Just use an expression of:
from app in AppInstances select new { AppId = app.AppId };
Or to make it equivalent to your original lambda:
from app in AppInstances select app.AppId
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With