Abp.AspNetCore.OData覆盖路由路径

Abp.AspNetCore.OData override the route path

我正在使用这个包配置一个新的 OData 项目。 我已经按照文档 https://aspnetboilerplate.com/Pages/Documents/OData-AspNetCore-Integration

配置了项目

但我希望覆盖默认路由。

而不是/odata 我希望 /odata/v2 作为默认值。

我查看了 Modules PreInitialize 覆盖中的 MapAction 方法,但我不确定如何覆盖它。

它在 AbpWebApiODataModuleConfiguration class 中有说明。您可以覆盖 MapAction 并将 routePrefix 设置为 /odata/v2