다음을 통해 공유


ODATA Reads with Parameters

Data Reads with Parameters

In this post, we’ll focus on how to read an OData service with a parameter.

Read service method with a parameter

[EnableQuery]
 public IQueryable<Student> Get(int marks)
  {
       return students.Where(s => s.Marks > marks).AsQueryable();
  }

Now, we’ll see how to retrieve data with a parameter,

Url in the browser

In the browser, we can see only filtered students. in the URL, append the parameter with values.

Power Query Window

From the Power Query window, we can see the data set like this.

Download

GitHub