LinqPad Not Returning Results With C# Statements

后端 未结 1 1558
眼角桃花
眼角桃花 2021-02-06 21:17

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 = fro         


        
1条回答
  •  余生分开走
    2021-02-06 22:01

    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
    

    0 讨论(0)
提交回复
热议问题