ASP.NET Core WebApi Sample

In this repository I want to give a plain starting point at how to build a WebAPI with ASP.NET Core.

This repository contains a controller which is dealing with houses. You can GET/POST/PUT/PATCH and DELETE them.

Hope this helps.

See the examples here:

GET all houses

http://localhost:29435/api/house

ASPNETCOREWebAPIGET

GET single house

http://localhost:29435/api/house/1

ASPNETCOREWebAPIGET

POST a house

http://localhost:29435/api/house

  {
    "street": "MyNewStreet",
    "city": "MyHomeTown",
    "zipCode": 1234
  }

ASPNETCOREWebAPIGET

PUT a house

http://localhost:29435/api/house/5

{
    "id": 5,
    "street": "HAAALELUJAH",
    "city": "HAAALELUJAH-TOWN",
    "zipCode": 1234657
}

ASPNETCOREWebAPIGET

PATCH a house

http://localhost:29435/api/house/4

[
    { "op": "replace", "path": "/street", "value": "PatchStreet" }
]

ASPNETCOREWebAPIGET

DELETE a house

http://localhost:29435/api/house

ASPNETCOREWebAPIGET