File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
AdvancedODataWebApiExample
OpenApiODataWebApiExample Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public void Configuration( IAppBuilder appBuilder )
4646 // in the underlying routing system. the order of route registration is important as well.
4747 //
4848 // DO NOT use configuration.MapHttpAttributeRoutes();
49- configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder . GetEdmModels ( ) ) ;
49+ configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder ) ;
5050 configuration . Routes . MapHttpRoute ( "orders" , "api/{controller}/{id}" , new { id = Optional } ) ;
5151
5252 configuration . Formatters . Remove ( configuration . Formatters . XmlFormatter ) ;
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ public void Configuration( IAppBuilder builder )
5959 new SupplierConfiguration ( ) ,
6060 } ,
6161 } ;
62- var models = modelBuilder . GetEdmModels ( ) ;
6362
6463 // global odata query options
6564 configuration . Count ( ) ;
@@ -71,7 +70,7 @@ public void Configuration( IAppBuilder builder )
7170 // INFO: only pass the route prefix to GetEdmModels if you want to split the models; otherwise, both routes contain all models
7271
7372 // WHEN VERSIONING BY: query string, header, or media type
74- configuration . MapVersionedODataRoute ( "odata" , "api" , models ) ;
73+ configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder ) ;
7574
7675 // WHEN VERSIONING BY: url segment
7776 // configuration.MapVersionedODataRoute( "odata-bypath", "api/v{apiVersion}", models );
You can’t perform that action at this time.
0 commit comments