在写分页的时候,返回Json数据给前台的时候,数据不能出来,原因就是Json数据的列名是大写的,而页面需要的是小写的。
解决办法
public class PageResult<T>
{
[JsonProperty("total")]
public long Total { get; set; }
[JsonProperty("rows")]
public List<T> Rows { get; set; }
}
在写分页的时候,返回Json数据给前台的时候,数据不能出来,原因就是Json数据的列名是大写的,而页面需要的是小写的。
解决办法
public class PageResult<T>
{
[JsonProperty("total")]
public long Total { get; set; }
[JsonProperty("rows")]
public List<T> Rows { get; set; }
}