- Give it a star ⭐!
- Overview
- Service Architecture
- Technologies
- Architecture
- Usage
- API Definition
- Credits
- VSCode Extensions
- Disclaimer
- License
Loving it? Show your support by giving this project a star!
In the tutorial, we build a CRUD REST API from scratch using .NET 6. As you would expect, the backend system supports Creating, Reading, Updating and Deleting breakfasts.
Simply git clone https://github.com/amantinband/buber-breakfast
and dotnet run --project BuberBreakfast
.
POST /breakfasts
{
"name": "Vegan Sunshine",
"description": "Vegan everything! Join us for a healthy breakfast..",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
201 Created
Location: {{host}}/Breakfasts/{{id}}
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Vegan Sunshine",
"description": "Vegan everything! Join us for a healthy breakfast..",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"lastModifiedDateTime": "2022-04-06T12:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
GET /breakfasts/{{id}}
200 Ok
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Vegan Sunshine",
"description": "Vegan everything! Join us for a healthy breakfast..",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"lastModifiedDateTime": "2022-04-06T12:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
PUT /breakfasts/{{id}}
{
"name": "Vegan Sunshine",
"description": "Vegan everything! Join us for a healthy breakfast..",
"startDateTime": "2022-04-08T08:00:00",
"endDateTime": "2022-04-08T11:00:00",
"savory": [
"Oatmeal",
"Avocado Toast",
"Omelette",
"Salad"
],
"Sweet": [
"Cookie"
]
}
204 No Content
or
201 Created
Location: {{host}}/Breakfasts/{{id}}
DELETE /breakfasts/{{id}}
204 No Content
- ErrorOr - A simple, fluent discriminated union of an error or a result.
-
VSCode Rest Client - REST Client allows you to send HTTP request and view the response in Visual Studio Code directly.
-
VSCode Markdown Preview Enhanced - Markdown Preview Enhanced is an extension that provides you with many useful functionalities for previewing markdown files.
This is an educational project. The source code is licensed under the MIT license.
This project is licensed under the terms of the MIT license.