ITKeyword,专注技术干货聚合推荐

注册 | 登录

c# - How can I generate the metadata for my OData service

itPublisher 分享于

2020腾讯云双十一活动,全年最低!!!(领取3500元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1073

【阿里云】双十一活动,全年抄底价,限时3天!(老用户也有),
入口地址https://www.aliyun.com/1111/home

推荐:如何使用ASP.NET Web API OData在Oracle中使用Entity Framework 6.x Code-First方式开发 OData V4 Service

  环境: Visual Studio 2013 + .Net Framework 4.5.2 1.新建项目 2.安装OData,ODP.NET 安装的包:   下面是部分代码: using System;using System.Collection

up vote 0 down vote favorite I'm using VS 2012. My server side is WebApi 4.5 and my client side application is WPF. I want to consume my odata service at the client side using "Add Service Reference" but I don't know how to generate the metadata file. c# rest asp.net-web-api odata
  |
  this question asked Aug 22 '13 at 0:34 Mahmoud Samy 1,194 1 19 48



 |  1 Answers

up vote 0 down vote ---Accepted---Accepted---Accepted---

You should point it to the root of your OData endpoint. If you're using the default routing, it's http://<address>:<port>/odata. If you've got a different routing, you should check your MapODataRoute line in WebApiConfig.cs. Clarification edit: The metadata itself can be found at http://<address>:<port>/odata/$metadata. However, as I said, in order to add it as a service reference, it should be sufficient to point just to the root.
  |
  this answer edited Aug 26 '13 at 8:17 answered Aug 22 '13 at 7:32 Kazu 475 2 13      http://<address>:<port>/odata is the address of my service. I'm asking about generating the metadata endpoint. –  Mahmoud Samy Aug 25 '13 at 3:11      I am aware of that. I've updated my answer in order to clarify it more. –  Kazu Aug 26 '13 at 8:18



 | 

up vote 0 down vote favorite I'm using VS 2012. My server side is WebApi 4.5 and my client side application is WPF. I want to consume my odata service at the client side using &quo

相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。