开发者

problem with SQL CE and orderby linq clause

开发者 https://www.devze.com 2022-12-31 05:13 出处:网络
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 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

精彩评论

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