Skip to content

Commit 46a3e39

Browse files
committed
Command to query
1 parent 5225598 commit 46a3e39

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ Result\<T> is our built-in discriminated union for message-oriented workflows, c
107107
```csharp
108108
public class GetUserHandler
109109
{
110-
public async Task<Result<User>> HandleAsync(GetUser cmd) {
111-
var user = await _repo.Find(cmd.Id);
110+
public async Task<Result<User>> HandleAsync(GetUser query) {
111+
var user = await _repo.Find(query.Id);
112112
if (user == null)
113-
return Result.NotFound($"User {cmd.Id} not found");
113+
return Result.NotFound($"User {query.Id} not found");
114114

115115
// implicitly converted to Result<User>
116116
return user;

0 commit comments

Comments
 (0)