.net - How to change route name in .NET Odata?
问题描述
I have build some odata function in .NET.
Now each entity url like below:
http://1.1.1.1/APIName/odata/Products
I want to remove "/odata" words in the url. Like below:
http://1.1.1.1/APIName/Products
How to modify it?
解决方案
好的..我找到了解决方案。
如下更新设置后,它按我的意愿工作。
config.Routes.MapODataServiceRoute("odata", "", builder.GetEdmModel());
推荐阅读
- pandas - Pivot_table 返回所有 NAN
- java - 无法获取对象数组的输入
- django - 从 django 模型中的保存方法中取消保存
- sql-server - gpg: 没有找到有效的 OpenPGP 数据。在 Ubuntu 18.04 中安装 SQL Server 时
- python - 如何在 Docker 上运行时重定向 FastAPI 文档
- android - 如何在一个回收站视图中显示来自两个不同型号/适配器的信息
- python - 在python中迭代文本文件的更有效方法?
- php - 在php中以降序显示json中数组中的日期
- jquery - 如何知道所有事件都在 fullcalendar v5 中呈现?
- instagram - Instagram 是否有用于访问用户已保存帖子的开发人员 API?