OData到底是什么?

发布于 2024-09-13 01:06:46 字数 182 浏览 7 评论 0原文

OData 到底是什么?开始学习这个新概念(关于实施数据服务)有多重要/必要?

另外,为什么 WCF 数据服务文档与 OData 如此紧密地结合在一起?

编辑:根据答案,这里有一个后续问题 - 我不应该尝试实现没有 OData 的 WCF 数据服务,或者我可以做到这一点,但这意味着以更艰难的方式来做(重新发明轮子)?

What exactly is OData and how important/necessary is it to start learning this new concept, wrt implementing data services?

Also why is the WCF Data Services documentation so tightly coupled with OData?

Edit: Based on answers here's a follow-up question - I shouldn't be trying to implement WCF Data Services sans OData,or I can do that but that would mean doing it the tougher way(reinventing the wheel)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

生生漫 2024-09-20 01:06:46

To answer the second question first, OData (or the Open Data Protocol) is the evolution of Project Astoria/ADO.NET Data Services and is Microsoft's attempt to create an "open standard" for creating readable/writable data using REST. OData is the open protocol that ADO.NET/WCF Data Services uses to implement its functionality, and was directly created as a result of use in several Microsoft products, thus the tight connection.

As for the WHAT, OData is, in essense, a set of extensions to the Atom Publishing Protocol that enable data representation, querying, alternate formatting (JSON), etc.

Here are a couple of good resources to get you started:

南薇 2024-09-20 01:06:46

您可能应该只是谷歌一下,但开放数据协议只是查询/更新数据的标准。它定义了用于更新/检索数据的休息基础标准。 WCF 数据服务之间存在紧密的依赖关系,因为 WCF DS 是兼容的使用 OData 协议。没有它,数据服务就不会存在,反之亦然;) OData 是 MS 的子项。

WCF 数据服务为您提供了一种使用 LINQ(Microsoft 的集成查询语言)为客户端查询提供服务的快速且简单的方法。 Microsoft 使建立数据服务变得非常容易,它为您提供了数据库的外观。

至于您真正需要了解多少 OData?除非您要创建自己的提供商,否则您不需要非常深入的知识。

如果您想开始了解内部结构,请查看此“OData 示例”多发性硬化症。为了了解数据服务的正确使用,我建议您查看 REST 和 LINQ。

You should probably just google around but Open Data Protocol is just a standard for querying/updating data. It defines a rest base standard for updating/retrieving data. There is a tight dependency between WCF Data Services because WCF DS are complient with the OData protocol. Without it Data Services wouldn't exist, and vice versa ;) OData is a child of MS.

WCF Data Services provide you a quick and easy way to service client side queries using LINQ, Which is Microsoft's Integrated Query Language. Microsoft has made it very easy to stand up Data Services which provide you with a facade into the database.

As for how much do you really need to know about OData? Unless you are going to be creating your own provider you dont need a very deep knowledge.

If you want to start getting into the internals check out this "OData by Example" from MS. In order to understand the proper use of Data Services i would suggest you look at REST and LINQ.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文