API for the last hotel in Cancun.
Unfortunately we only have one room available, please check the days already booked in advance.
- dotnet ef --project .\LastRoom.Api\ database update
- dotnet run --project .\LastRoom.Api\
List the next 30 days and if the room is vacant.
- Response
[
{
"vacant": false,
"date": "2022-09-11"
},
...
]The user can retrieve the booking with the ticket.
- Response
{
"ticket": "65475ce5-3293-4f96-8c1a-dbb6350420c1",
"clientFullName": "User 01",
"checkInDate": "2022-09-11",
"checkOutDate": "2022-09-13"
}The user can create a new booking.
- Request
{
"clientIdentification": "id",
"clientFullName": "User 01",
"checkInDate": "2022-09-11",
"checkOutDate": "2022-09-13"
}- Response
{
"ticket": "65475ce5-3293-4f96-8c1a-dbb6350420c1",
"clientFullName": "User 01",
"checkInDate": "2022-09-11",
"checkOutDate": "2022-09-13"
}The user can update the booking.
- Request
{
"clientIdentification": "id",
"clientFullName": "User 01",
"checkInDate": "2022-09-11",
"checkOutDate": "2022-09-13"
}- Response
{
"ticket": "65475ce5-3293-4f96-8c1a-dbb6350420c1",
"clientFullName": "User 01",
"checkInDate": "2022-09-11",
"checkOutDate": "2022-09-13"
}The user can undo the booking.
- Response 204
-
We can remove the manual mapping from the controller with:
-
We can separate the controllers from the services using CQRS with:
-
MediatR can also be good for separating validation from service.
-
Improve the error object in the return.
-
Create a docker file for deployment.
- LastRoom.Api
- LastRoom.Api.Tests