【发布时间】:2015-12-03 19:17:00
【问题描述】:
我必须使用 Odata 服务中定义的方法。我对 OData 服务非常陌生,真的不知道如何使用它。以下是 Odata 服务中定义的方法。
[HttpPost, ActionName("GetEmpsByPinAndCityName")]
[EnableQuery]
public IHttpActionResult GetEmpsByPinAndCityName(int pincode, string cityName)
{
var result = this.context.EmpSets.Where(x => x.PinCode == pincode & x.CityName == cityName).ToList();
return result;
}
那么谁能解释一下我如何在 C# 或 Jquery 中使用它。
非常感谢
【问题讨论】:
-
说不定odata.github.io/WebApi/#04-06-function-parameter-support有一些资料可以先参考一下。
标签: c# jquery asp.net asp.net-web-api odata