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
15
15
{
16
16
// GET ~/orders?api-version=2.0
17
17
[ ODataRoute ]
18
- public IHttpActionResult Get ( ODataQueryOptions < Person > options ) =>
18
+ public IHttpActionResult Get ( ODataQueryOptions < Order > options ) =>
19
19
Ok ( new [ ] { new Order ( ) { Id = 1 , Customer = $ "Customer v{ Request . GetRequestedApiVersion ( ) } " } } ) ;
20
20
21
21
// GET ~/orders({id})?api-version=2.0
22
22
[ ODataRoute ( "({id})" ) ]
23
- public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Person > options ) =>
23
+ public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Order > options ) =>
24
24
Ok ( new Order ( ) { Id = id , Customer = $ "Customer v{ Request . GetRequestedApiVersion ( ) } " } ) ;
25
25
}
26
26
}
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ public class OrdersController : ODataController
15
15
// GET ~/v1/orders
16
16
// GET ~/orders?api-version=1.0
17
17
[ ODataRoute ]
18
- public IHttpActionResult Get ( ODataQueryOptions < Person > options ) =>
18
+ public IHttpActionResult Get ( ODataQueryOptions < Order > options ) =>
19
19
Ok ( new [ ] { new Order ( ) { Id = 1 , Customer = "Bill Mei" } } ) ;
20
20
21
21
// GET ~/v1/orders(1)
22
22
// GET ~/orders(1)?api-version=1.0
23
23
[ ODataRoute ( "({id})" ) ]
24
- public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Person > options ) =>
24
+ public IHttpActionResult Get ( [ FromODataUri ] int id , ODataQueryOptions < Order > options ) =>
25
25
Ok ( new Order ( ) { Id = id , Customer = "Bill Mei" } ) ;
26
26
}
27
27
}
You can’t perform that action at this time.
0 commit comments