OData和Cosmos DB [英] OData and Cosmos DB

查看:67
本文介绍了OData和Cosmos DB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻求将OData v4用作我正在研究的ASP.NET Core应用程序中的查询工具,而我们的后备持久存储是Cosmos DB.到目前为止,我还没有找到一种使OData查询针对DocumentQuery IQueryable接口运行而又不会遇到某种异常或错误的方法.

I'm looking to implement OData v4 for as a querying tool in an ASP.NET Core application I'm working on, and our backing persistence store is Cosmos DB. So far, I haven't figured out a way to make OData queries run against the DocumentQuery IQueryable interface without encountering some sort of exception or error.

我想知道是否存在一种针对Cosmos Document DB(而不是Table API)使用OData的干净"方法,如果可以,怎么办?到目前为止,我发现的只是一个使用Framework v4.6的非官方库,但没有正式的库,而且我发现有关实现OData的所有文档几乎都针对Entity Framework或内存数据存储.

I was wanting to know if there was a "clean" way to utilize OData against Cosmos Document DB (not the Table API), and if so, how? So far, all I've found is an unofficial library that's using Framework v4.6, but nothing official, and all documentation I've found about implementing OData has almost exclusively been ran against Entity Framework or in-memeory data store.

推荐答案

我知道这并不是我的问题最有见地的答案,但此处的正确答案实际上是不要尝试这样做.如果您所在的位置有人要求您尝试将两种并非真正融合在一起的技术强加于人,请说不,并处理后果.

I know this isn't exactly the most insightful answer to my question, but the correct answer here is really to just not attempt to do this. If you're ever in a position where someone asks you to try to force together two technologies that don't really go together, say no and deal with the consequences.

这篇关于OData和Cosmos DB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆