开发者

LINQ Table does not contain a definition for count (or any other Queryable extension methods)

We are changing some legacy code to use LINQ to SQL.

In a seperate test throwaway class I tried making m开发者_Python百科y db context and I can do

mydbcontext.mytable.Count()

fine, and it's all intellisensed.

However, when trying to implement this in the class (which is in the same assembly), the Queryable methods, such as Count, Where, etc are no longer valid.

Any ideas why this would be?


make sure you have using System.Linq;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜