Search code examples
aspnetboilerplate

Abp.AspNetCore.OData override the route path


I am just configuring a new OData project using this package. I have configured the project as per the documentation https://aspnetboilerplate.com/Pages/Documents/OData-AspNetCore-Integration

But I am looking to override the default route.

Instead of /odata I would like /odata/v2 as the default.

I've had a look into the MapAction method in the Modules PreInitialize override, but I am unsure how to override it.


Solution

  • it's stated in AbpWebApiODataModuleConfiguration class. You can override MapAction and set routePrefixto /odata/v2