- .NET 8 SDK
- Docker (optional, for running RabbitMQ in a container)
Example
OrderService
│
├── Controllers
│ └── OrderController.cs
│
├── Domain
│ └── Models
│ └── Order.cs
│
├── Application
│ └── Handlers
│ ├── CreateOrderCommandHandler.cs
│ ├── GetOrderByIdQueryHandler.cs
│ └── GetAllOrdersQueryHandler.cs
│ └── Commands
│ └── CreateOrderCommand.cs
│ └── Queries
│ ├── GetOrderByIdQuery.cs
│ └── GetAllOrdersQuery.cs
│
├── Infrastructure
│ ├── Data
│ └── ApplicationDbContext.cs
│ ├── MessageBus
│ └── RabbitMQMessageBus.cs
│ └── Repositories
│ ├── IOrderRepository.cs
│ └── OrderRepository.cs
│
├── Startup.cs
└── Program.cs
cd OrderManagament
docker-compose up --buildcurl --request POST \
--url http://localhost:8080/api/User \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/9.3.2' \
--data '{
"Username": "usertest",
"Password": "password123",
"Email": "correo@correo.com"
}'
curl --request GET \
--url http://localhost:8080/api/User/1 \
--header 'User-Agent: insomnia/9.3.2'
curl --request POST \
--url http://localhost:8080/api/User/authenticate \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/9.3.2' \
--data '{
"Username": "usertest",
"Password": "password123"
}'
curl --request POST \
--url http://localhost:8080/api/Order \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/9.3.2' \
--data '{
"ProductName": "TV",
"Quantity": 2
}'
curl --request GET \
--url http://localhost:8080/api/Order \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/9.3.2' \
--data '{
"ProductName": "TV",
"Quantity": 2
}'