Could not find an implementation of the query pattern for source type 'LINQPad.User.Sync'.

I am trying to do a simple query. Language I have selected in the tool is C# expression, and it is connecting to correct database. What is wrong? The table in SQL Server is called application.Sync

from p in Syncs.OrderBy(r =>r.Revision).FirstOrDefault(r =>r.TableCode==30) select new { p.ID }

Thank you.

Comments

  • If I remove this section of the query it works. Odd.

    .FirstOrDefault(r =>r.TableCode==30)
  • Your query doesn't make sense. What are you trying to do?

    Perhaps what you want is this:

    Syncs.OrderBy(r =>r.Revision).Select (r => r.ID).FirstOrDefault()

    or:

    Syncs.OrderBy(r =>r.Revision).First(r =>r.TableCode==30).ID