File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
AdvancedODataWebApiSample/Controllers
BasicODataWebApiSample/Controllers Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ public class Orders2Controller : ODataController
1515 {
1616 // GET ~/orders?api-version=2.0
1717 [ ODataRoute ]
18- public IHttpActionResult Get ( ODataQueryOptions < Person > options ) =>
18+ public IHttpActionResult Get ( ODataQueryOptions < Order > options ) =>
1919 Ok ( new [ ] { new Order ( ) { Id = 1 , Customer = $ "Customer v{ Request . GetRequestedApiVersion ( ) } " } } ) ;
2020
2121 // GET ~/orders({id})?api-version=2.0
2222 [ ODataRoute ( "({id})" ) ]
23- public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Person > options ) =>
23+ public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Order > options ) =>
2424 Ok ( new Order ( ) { Id = id , Customer = $ "Customer v{ Request . GetRequestedApiVersion ( ) } " } ) ;
2525 }
2626}
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ public class OrdersController : ODataController
1515 // GET ~/v1/orders
1616 // GET ~/orders?api-version=1.0
1717 [ ODataRoute ]
18- public IHttpActionResult Get ( ODataQueryOptions < Person > options ) =>
18+ public IHttpActionResult Get ( ODataQueryOptions < Order > options ) =>
1919 Ok ( new [ ] { new Order ( ) { Id = 1 , Customer = "Bill Mei" } } ) ;
2020
2121 // GET ~/v1/orders(1)
2222 // GET ~/orders(1)?api-version=1.0
2323 [ ODataRoute ( "({id})" ) ]
24- public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Person > options ) =>
24+ public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Order > options ) =>
2525 Ok ( new Order ( ) { Id = id , Customer = "Bill Mei" } ) ;
2626 }
2727}
You can’t perform that action at this time.
0 commit comments