Linq 2 Entity Framework: Cannot convert lambda expression to type 'string' because it is not a delegate type

出错代码:

  var x = from c in Database.Company select c;

 错误提示:

  Cannot convert lambda expression to type 'string' because it is not a delegate type

解决方法:

  添加"using System.Linq;"行.

出错原因:

 C#编译器未找到合适的Select方法来翻译"select c".

posted on 2008-09-11 16:34  deerchao  阅读(1472)  评论(0编辑  收藏  举报