You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a number of existing controllers with the same names as our OData controllers and we would like to keep it that way since we use /api/controller for the current routing and want to use odata/controller for new odata enabled controllers. I have reviewed some of the odata and routing documents and in particular https://devblogs.microsoft.com/odata/routing-in-asp-net-core-8-0-preview/ since it applies to version 8 which I am using. I was thinking that the easiest way would be to use Areas so that my controllers could be of the same name but I could not come up with a configuration via maproute or attributes that worked and always ended up with an error "Attribute routes with the same name 'odata/controller' must have the same template" it would then list "api/controller/odata/controller" and "odata/controller" as the two with problem. If I rename the controller, it works but I would like to leave them the same for backward compatibility. Are Areas supported by OData routing? Is there another way to achieve what I am trying to do, same controller names, different routes?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
We have a number of existing controllers with the same names as our OData controllers and we would like to keep it that way since we use /api/controller for the current routing and want to use odata/controller for new odata enabled controllers. I have reviewed some of the odata and routing documents and in particular https://devblogs.microsoft.com/odata/routing-in-asp-net-core-8-0-preview/ since it applies to version 8 which I am using. I was thinking that the easiest way would be to use Areas so that my controllers could be of the same name but I could not come up with a configuration via maproute or attributes that worked and always ended up with an error "Attribute routes with the same name 'odata/controller' must have the same template" it would then list "api/controller/odata/controller" and "odata/controller" as the two with problem. If I rename the controller, it works but I would like to leave them the same for backward compatibility. Are Areas supported by OData routing? Is there another way to achieve what I am trying to do, same controller names, different routes?
Thank you in advance.
The text was updated successfully, but these errors were encountered: