File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ A simplified console application demonstrating all key features of Foundatio.Med
1111
1212### 2. CRUD Operations with Result Pattern
1313- ** OrderHandler** with full CRUD operations
14- - ** Result& lt ; T & gt ; ** pattern for success/failure handling
14+ - ** ` Result<T> ` ** pattern for success/failure handling
1515- Validation with detailed error messages
1616- Status codes (Created, NotFound, NoContent, etc.)
1717
@@ -53,19 +53,19 @@ public static class SimpleHandler
5353``` csharp
5454public class OrderHandler
5555{
56- public async Task< Result< Order>> HandleAsync (CreateOrder command )
56+ public async Task < Result < Order >> HandleAsync (CreateOrder command )
5757 {
5858 // Validation
5959 if (string .IsNullOrWhiteSpace (command .CustomerId ))
60- return Result & lt ; Order & gt ; .Invalid (new ValidationError (" CustomerId" , " Customer ID is required" ));
60+ return Result < Order > .Invalid (new ValidationError (" CustomerId" , " Customer ID is required" ));
6161
6262 // Business logic
6363 var order = new Order (/* ... */ );
6464
6565 // Event publishing
6666 await _mediator .PublishAsync (new OrderCreated (/* ... */ ));
6767
68- return Result & lt ; Order & gt ; .Created (order , $" /orders/{orderId }" );
68+ return Result < Order > .Created (order , $" /orders/{orderId }" );
6969 }
7070}
7171```
You can’t perform that action at this time.
0 commit comments