Skip to content

Commit 3424728

Browse files
committed
Minor readme updates.
1 parent 86f5d72 commit 3424728

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ As a first step you need to setup IQueryPipe interface that will be used to exec
3636
using Belgrade.SqlClient;
3737
using System.Threading.Tasks;
3838
39-
// For more information on enabling Web API for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
40-
4139
namespace Catalog.Controllers
4240
{
4341
[Route("api/[controller]")]
@@ -61,7 +59,7 @@ Now you need to create async method that will serve requests. The only thing tha
6159
[HttpGet("Load")]
6260
public async Task Load()
6361
{
64-
await sqlQuery.Stream("select name, surname, address, town from people for json path, root('data')", Response.Body, @"{""data"":[]");
62+
await sqlQuery.Stream("select * from people for json path", Response.Body, "[]");
6563
}
6664
```
6765

@@ -74,6 +72,7 @@ To implement OData Service, you would need to add the following fields in your c
7472
- UriParser that will parse OData Http request and extract information from $select, $filter, $orderby, $top, and $skip parameters
7573
- QueryBuilder that will create T-SQL query that will be executed.
7674

75+
Example is shown in the following code:
7776
```
7877
IQueryPipe sqlQuery = null;
7978
@@ -87,7 +86,7 @@ To implement OData Service, you would need to add the following fields in your c
8786
}
8887
```
8988

90-
Now you need to create async method that will serve OData requests. First you need to parse Request parameters using UriParser in order to extract QuerySpec. Then you need to use QueryBuilder to create SQL query using the QuerySpec. Then you need to provide SqlQuery to QueryPipe that will stream results to client:
89+
Now you need to create async method that will serve OData requests. First, you need to parse Request parameters using UriParser in order to extract QuerySpec. Then you need to use QueryBuilder to create SQL query using the QuerySpec. Then you need to provide sql query to QueryPipe that will stream results to client using Response.Body:
9190

9291
```
9392
// GET api/People

0 commit comments

Comments
 (0)