Skip to content
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

How to config MapODataRoute for dynamic Edm model creation #138

Open
onlinemxu opened this issue Sep 20, 2020 · 0 comments
Open

How to config MapODataRoute for dynamic Edm model creation #138

onlinemxu opened this issue Sep 20, 2020 · 0 comments

Comments

@onlinemxu
Copy link

Hi,

I try to build OData service with asp.net core 3.1. It has very similar requirements as Dynamic EDM model creation sample (https://github.com/OData/ODataSamples/tree/master/WebApiCore/DynamicEdmModelCreation)

Below is my code in Configure in Startup.cs,

` app.UseEndpoints(endpoints =>

{
endpoints.EnableDependencyInjection();
endpoints.Expand().Select().Count().Filter().OrderBy();
endpoints.MapControllers();
//endpoints.MapODataRoute()
endpoints.MapODataRoute("odata", "odata/{tenant}", GetEdmModel(app.ApplicationServices));
});`

GetEdmModel shall be able to read {tenant} in order to provide EDM models base on the given tenant. Any suggestion is highly appreciated.

Thanks,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant