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;
精彩评论