让Asp.Net WebAPI支持OData查询,排序,过滤。
摘要:让Asp.Net WebAPI支持OData后,就能支持在url中直接输入排序,过滤条件了。一.创建Asp.Net WebAPI项目:二.使用NuGet安装Asp.Net WebAPI 2.2和OData包三.修改WebAPIConfig.cs:using System;using System.C...
阅读全文
posted @
2015-01-19 11:47
BobLiu
阅读(3407)
推荐(1) 编辑
让ASP.NET Web API支持$format参数的方法
摘要:在不使用OData的情况下,也可以让ASP.NET Web API支持$format参数,只要在WebApiConfig里添加如下三行红色粗体代码即可:using System;using System.Collections.Generic;using System.Linq;using Syst...
阅读全文
posted @
2015-01-16 14:13
BobLiu
阅读(1937)
推荐(0) 编辑