File tree 2 files changed +2
-3
lines changed
AdvancedODataWebApiExample
OpenApiODataWebApiExample
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 )
46
46
// in the underlying routing system. the order of route registration is important as well.
47
47
//
48
48
// DO NOT use configuration.MapHttpAttributeRoutes();
49
- configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder . GetEdmModels ( ) ) ;
49
+ configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder ) ;
50
50
configuration . Routes . MapHttpRoute ( "orders" , "api/{controller}/{id}" , new { id = Optional } ) ;
51
51
52
52
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 )
59
59
new SupplierConfiguration ( ) ,
60
60
} ,
61
61
} ;
62
- var models = modelBuilder . GetEdmModels ( ) ;
63
62
64
63
// global odata query options
65
64
configuration . Count ( ) ;
@@ -71,7 +70,7 @@ public void Configuration( IAppBuilder builder )
71
70
// INFO: only pass the route prefix to GetEdmModels if you want to split the models; otherwise, both routes contain all models
72
71
73
72
// WHEN VERSIONING BY: query string, header, or media type
74
- configuration . MapVersionedODataRoute ( "odata" , "api" , models ) ;
73
+ configuration . MapVersionedODataRoute ( "odata" , "api" , modelBuilder ) ;
75
74
76
75
// WHEN VERSIONING BY: url segment
77
76
// configuration.MapVersionedODataRoute( "odata-bypath", "api/v{apiVersion}", models );
You can’t perform that action at this time.
0 commit comments