Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiasnordqvist committed Sep 11, 2023
1 parent edb980d commit ea88e47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Diary/2023-09-11_And.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To fix this, you can nest the Binds, so that the customer reference is available
```csharp
Result<Unit> result = CustomerRepository.Load(customerId)
.Bind(customer => OrderRepository.Query(x => x.CustomerId == customerId)
.Bind(orders => customer.SetOrderCount(orders.Count()))); // Binds directly on the returned Result of the previous Bind.
.Bind(orders => customer.SetOrderCount(orders.Count()))); // Binds directly on the returned Result of the function inside the "previous" Bind.
```

"And", can do this for you
Expand Down
2 changes: 1 addition & 1 deletion Results/Tap.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
namespace DotNetThoughts.Results;
public static partial class And
public static partial class Extensions
{
public static Result<Unit> Tap<T>(this Result<T> source, Action<T> next)
{
Expand Down

0 comments on commit ea88e47

Please sign in to comment.