@@ -74,7 +74,8 @@ <h2>In-Memory data source</h2>
74
74
return instance;
75
75
}
76
76
}
77
- public List< Person > People { get; set; }</ p >
77
+ public List< Person > People { get; set; }
78
+ public List< Trip > Trips { get; set; }
78
79
private DemoDataSources()
79
80
{
80
81
this.Reset();
@@ -83,6 +84,7 @@ <h2>In-Memory data source</h2>
83
84
public void Reset()
84
85
{
85
86
this.People = new List< Person > ();
87
+ this.Trips = new List< Trip > ();
86
88
}
87
89
public void Initialize()
88
90
{
@@ -163,6 +165,7 @@ <h2>Add Controllers</h2>
163
165
using System.Web.OData;
164
166
namespace Demo.Controllers
165
167
{
168
+ [EnableQuery]
166
169
public class TripsController : ODataController
167
170
{
168
171
public IHttpActionResult Get()
@@ -211,10 +214,10 @@ <h2>Try with it</h2>
211
214
< p > Service document</ p >
212
215
< p > < code > http://localhost:[portNumber]/</ code > </ p >
213
216
< p > Service metadata</ p >
214
- < p > < code > http://localhost:21830 /$metadata</ code > </ p >
217
+ < p > < code > http://localhost:[portNumber] /$metadata</ code > </ p >
215
218
< p > Get People</ p >
216
- < p > < code > http://localhost:21830 /People</ code > </ p >
219
+ < p > < code > http://localhost:[portNumber] /People</ code > </ p >
217
220
< p > Queries</ p >
218
- < p > < code > http://localhost:21830 /People?$filter=contains(Description,'Lorem')</ code > </ p >
219
- < p > < code > http://localhost:21830 /People?$select=Name</ code > </ p >
220
- < p > < code > http://localhost:21830 /People?$expand=Trips</ code > </ p >
221
+ < p > < code > http://localhost:[portNumber] /People?$filter=contains(Description,'Lorem')</ code > </ p >
222
+ < p > < code > http://localhost:[portNumber] /People?$select=Name</ code > </ p >
223
+ < p > < code > http://localhost:[portNumber] /People?$expand=Trips</ code > </ p >
0 commit comments