你的位置:首页 > 软件开发 > ASP.net > OData V4 系列 Action 与 Function

OData V4 系列 Action 与 Function

发布时间:2015-11-12 22:00:09
OData 学习目录 了解过WebApi的都知道,WebApi默认方法 Get、Post、Put,如果增加其它过多Post方法即不能识别,还需增加其它配制,请求的Url还需加上Controller及Action,与Restful设计不一致,Od ...

OData V4 系列  Action 与 Function

       OData 学习目录

       了解过WebApi的都知道,WebApi默认方法 Get、Post、Put,如果增加其它过多Post方法即不能识别,还需增加其它配制,请求的Url还需加上Controller及Action,与Restful设计不一致,Odata可以解决这样的问题。

    配制路由服务       

      builder.Namespace = "ProductService";      builder.EntityType<Product>().Collection        .Function("MostExpensive") //函数路由        .Returns<double>();      builder.Namespace = "ProductService";      builder.EntityType<Product>()        .Action("Rate") //Action路由        .Parameter<int>("Rating");

 

海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com

原标题:OData V4 系列 Action 与 Function

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

可能感兴趣文章

我的浏览记录