OData 与 WCF REST
我有一个 WCF REST 服务,我已经实现了所有单一结果端点。现在我需要实现返回集合的端点。我意识到 WCF DataServices 允许我返回 ATOM,但这需要新的服务定义。有没有办法让我现有的返回集合的 REST 端点将该数据公开为 OData,而无需创建全新的服务?
I have a WCF REST Service that I have implemented all single result endpoints. Now I need to implement endpoints that return collections. I realize there is the WCF DataServices that will allow me to return ATOM, but that requires a new service definition. Is there any way to have my existing REST endpoints that return collections expose that data as OData without creating a whole new service?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您只是想编写 OData,但不想使用任何 OData V3 功能,我建议您使用 O数据库。它是 .Net 的开源 OData 序列化库。这并不做任何花哨的服务,它只是为了写作而存在。请注意,这是预发布版本。
If you are just looking to write OData provided you aren't looking to use any OData V3 features I would suggest the OData Library. Its an open source OData serialization library for .Net. This doesn't do any fancy service stuff it exists solely for writing. Please note though that this is a pre-release.