Open onlinemxu opened 3 years ago
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
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