--跳过10条取2条 也叫分页select top 2 * from studentwhere studentno not in (select top 2 studentno from student order by studentno)order by studentno --row_number ()over() 分页select * from(select *,ROW_NUMBER()over(order by studentno)as myid from student ) as t…
今天在通过OData终结点update记录的时候报"Error processing request stream. The request should be a valid top-level resource object",经过谷歌查询后发现是属性赋值时格式不对,其实从英文的字面意思也能猜出一二,原始代码如下面 var updateEntity = new Object(); updateEntity.sc_bizState = EMEntityState.complete ;…
本篇使用ASP.NET Web API来体验OData各种query. 首先是本篇即将用到的Model.使用的OData版本是4.0. public class Customer { public int Id { get; set; } public string Name { get; set; } public Gender Gender { get; set; } public DateTimeOffset BirthTime { get; set; } public List<Orde…