Skip to content

Commit

Permalink
Bump version to 1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amantinband committed Jan 5, 2024
1 parent 6afec71 commit c29bc81
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,6 @@ public async Task<IActionResult> GetUser(Guid Id)
}
```

Or, using `Then`/`Else`:

```csharp
[HttpGet("{id:guid}")]
public async Task<IActionResult> GetUser(Guid Id)
{
return await _mediator.Send(new GetUserQuery(Id))
.Then(user => _mapper.Map<UserResponse>(user))
.Then(userResponse => Ok(userResponse))
.Else(errors => ValidationProblem(errors.ToModelStateDictionary()));
}
```

A nice approach, is creating a static class with the expected errors. For example:

```csharp
Expand Down
2 changes: 1 addition & 1 deletion src/ErrorOr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<PackageId>ErrorOr</PackageId>
<Version>1.7.0</Version>
<Version>1.8.0</Version>
<Authors>Amichai Mantinband</Authors>
<PackageIcon>icon-square.png</PackageIcon>
<PackageTags>Result,Results,ErrorOr,Error,Handling</PackageTags>
Expand Down

0 comments on commit c29bc81

Please sign in to comment.