c# - How to set up an Odata service that supports $crossjoin, hosted on ASP.net core or separately
问题描述
I'm working on a new web application in ASP.net core and currently use the OData WebApi. The issue I'm currently having is that one OData feature I want to use $Crossjoin is not supported by the web api. Also noted in this question from 2 years ago. And I have not seen any updates since.
Essentially I want to be able to use a query like this with Odata and have my application hosted on ASP.net Core:
http://host/service/$crossjoin(Products,Sales)?
$filter=Products/ID eq Sales/ProductID
So right now I'm assuming there is no way to get $Crossjoin to work with WebAPI. Are there any libraries that will support that protocol and can also be hosted on ASP.net core or at the same time? One that I came across OData V4 Service modules - SQL Connector that I can host using node.
The reason why I would like to use Crossjoin is because I cannot modify tables or add views to the database I am accessing. It does not use Primary or Foreign Keys. And I will want to be be able to join on multiple properties. I am also early into building my application so I don't mind migrating my current WebApi to something else to save me time in the future.
To have an idea of how my application looks, it is based off the ASP.NET Core Vue Starter template with Typescript. I am also using Microsoft SQL Server 2012, and Entity Framework Core.
Any suggestions are greatly appreciated, thank you.
解决方案
推荐阅读
- python - python中的矩阵COUNT + GROUP BY
- php - 如何调试以 137 错误退出的 php 脚本?
- azure - .Net Core 2.2 指定的 Azure 回复 url 与为应用程序配置的回复 url 不匹配
- linux - 如果一个文件已被删除,但一个进程仍然持有文件句柄,另一个进程可以访问它吗?
- nativescript - 如何在 Nativescript 中没有 Actionbar 的情况下更改 IOS 中的状态栏颜色?
- c# - 使用 Wix 构建 MSI 的递归 DirFiles#
- intellij-idea - 在 Intellij IDEA 中配置 UnetStack
- excel - 通过 VBA 将 Excel 图表放入 PowerPoint
- postgresql - 插入到选择嵌套选择(S)性能。庞大的工会选择
- python - Pytorch 批量矩阵-矩阵外积