Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

[Discussion/Proposal] OData "prefixes" should be replaced with MVC Areas #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
julealgon opened this issue Jan 21, 2022 · 2 comments
Closed

Comments

@julealgon
Copy link
Contributor

The "prefix" idea in OData is extremely old, and always served as a means to have multiple EDM models in the same project. The prefix effectively provides a means to isolate one "API" from another. The whole thing is completely custom, non-standard AspNet MVC.

I'd like to understand if it would be possible to just leverage MVC Areas instead, and get rid of the custom aspects of OData prefixes. There would still be a way to tell the framework that a different EDM model was to be used, but this would be then keyed by the MVC area.

Areas serve basically the same purpose as OData prefixes from my understanding: isolating parts of an API in a different "scope", by adding a prefix to the route. Similarly to how v8 leverages standard MVC routing, I think OData should also leverage standard MVC area functionality instead of the whole new "OData prefix" concept. This would make the API more seamless to use and more consistent.

From what I can tell, OData doesn't deal well with Areas at all today, and it would become a huge mess if both OData prefixes and areas were to be supported at the same time.

Related:

@xuzhg
Copy link
Member

xuzhg commented Jan 21, 2022

@julealgon I enabled discussion. Is it ok to convert this issue to discussion?

@julealgon
Copy link
Contributor Author

@julealgon I enabled discussion. Is it ok to convert this issue to discussion?

Of course, go ahead @xuzhg .

Good idea enabling discussions... I checked before creating the issue and would've used that instead if it was available.

@OData OData locked and limited conversation to collaborators Jan 21, 2022
@xuzhg xuzhg converted this issue into discussion #455 Jan 21, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants