Skip to content

Highlights

M. Ece ERCAN edited this page Apr 26, 2019 · 3 revisions

# Highlights

1) Patch request have various versions like this: [ { "op": "add", "path": "/description", "value": "new description" }, { "op": "copy", "from": "/description", "path": "/title" } ]

or remove: [ { "op": "remove", "path": "/description" } ]

2) Since we need routing for the controllers' actions we can use [FromQuery] attribute like this: public IActionResult GetAuthors(FromQueryint pageNumber = 1, int pageSize = 10 ){ ... } But this is unnecessary unless we would like to re-name parameter called pageNumber to "page". Without FromQuery statement the link will be like this: http://localhost:6058/api/authors?**pageNumber**=1&pageSize=5. With FromQuery attribute the query would be like this: http://localhost:6058/api/authors?**page**=1&pageSize=5.

Clone this wiki locally