-2

I'm trying to write a Linq Query to access data from my Client table. I have the proper Using statement and packages included for Linq. However, when I try to access the client table, I receive the following error.

CS1936 C# Could not find an implementation of the query pattern for source type ''. '' not found.

Client clientID = from c in Client
where c.ID == 1
select c.clientID;

Can someone shed some light on the reason I might be receiving this error?

1 Answers1

0

Client is a class, but it is not implementing IEnumerable

The select clause calls Enumerable.Select under the hood. Because Client doesn't implement IEnumerable, you can't use your query against it.

Esoteric Screen Name
  • 6,082
  • 4
  • 29
  • 38