dotnet-cqrs/docs/tutorials/ecommerce-example/09-complete-code.md

1.5 KiB

E-Commerce Example: Complete Code

See the complete working implementation in the Svrnty.Sample project.

Project Structure

OrderManagement.Api/
├── Program.cs
├── Controllers/
└── Protos/

OrderManagement.CQRS/
├── Commands/
│   ├── PlaceOrderCommand.cs
│   ├── CancelOrderCommand.cs
│   └── Validators/
├── Queries/
│   ├── GetOrderQuery.cs
│   └── ListOrdersQuery.cs
├── Events/
│   └── OrderPlacedEvent.cs
├── Workflows/
│   └── OrderFulfillmentSaga.cs
└── Projections/
    └── OrderSummaryProjection.cs

OrderManagement.Domain/
├── Entities/
│   ├── Order.cs
│   └── Customer.cs
└── Events/

OrderManagement.Infrastructure/
├── Repositories/
│   ├── OrderRepository.cs
│   └── CustomerRepository.cs
└── Services/
    ├── PaymentService.cs
    └── ShippingService.cs

See Sample Project

The Svrnty.Sample project contains a complete implementation:

Run the Sample

cd Svrnty.Sample
dotnet run

See Also