开发者

problem with SQL CE and orderby linq clause

I am using linq with SQL CE, but for a simple query like this:

var points=from i in this.DomainBoundaryPoints orderby i.Index select i;

I get this error:

Could not find an implementatio开发者_StackOverflown of the query pattern for source type 'System.Data.Linq.EntitySet<DAL.DomainBoundaryPoint>'.  'OrderBy' not found.  Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?

Does SQL CE support 'order by' TSQL clause? Where is the problem?


Of course SQL CE supports orderby...

Try to do what the error message tells you...

  • add a reference to System.Core if it's not there
  • add a using directive for System.Linq
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜