.net(c#) 简单调用SAP byd OData 服务

.net Odata 插件

OData Connected Service

https://marketplace.visualstudio.com/items?itemName=laylaliu.ODataConnectedService#review-details

OData v4 Client Code Generator

https://marketplace.visualstudio.com/items?itemName=bingl.ODatav4ClientCodeGenerator


1.在Byd中建立自定义 OData服务

image

image

image

服务名称要用英文开头 不包含特殊字符,不然会报错,保存

2.设置OData服务内容

image

工作中心视图用于设置整体服务的权限,也可以不设置,然后在实体对象中明细设置对象权限

image

选择业务对象.并创建对应实体类型

扫描二维码关注公众号,回复: 5678430 查看本文章

image

导入功能中,设置功能类型和参数

image

保存并激活

image

打开 服务 URL 并保存为 接口配置.XML

image

测试接口

image

3.在VS 2015中使用

添加服务引用

image

地址可以选择保存的 接口配置.XML 也可以直接使用URL(需要用Byd 用户登陆)

image

点确定就可以了

4.在VS 2017中使用

添加链接的服务

image

选择插件,没安装的需要安装

image

选择导出的 接口配置.xml  (不支持URL登陆)

image

5.Codeing


image

猜你喜欢

转载自www.cnblogs.com/hongshao/p/10606122.html