对于Ria Service,我有一个linq查询,如:
EntityQuery<Employee> query = from e in ctx.GetEmployeeQuery()
orderby e.DateCreated descending
select e;
然后我想从这个查询获得前100条记录,比如SQL 从员工中选择前100名*
如何编写linq查询?
答案 0 :(得分:38)
EntityQuery<Employee> query = (from e in ctx.GetEmployeeQuery()
orderby e.DateCreated descending
select e).Take (100);