Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public IActionResult Register(string username)
return createUserResult.Match(
user => new RedirectResult("/dashboard"),
invalidName => {
ModelState.AddModelError(nameof(username), $"Sorry, that is not a valid username.");
ModelState.AddModelError(nameof(username), "Sorry, that is not a valid username.");
return View("Register");
},
nameTaken => {
Expand Down Expand Up @@ -120,7 +120,7 @@ The return value indicates if the OneOf contains a T𝑥 or not. If so, then `va
```csharp
IActionResult Get(string id)
{
OneOf<Thing, NotFound, Error> thingOrNotFoundOrError = GetThingFromDb(string id);
OneOf<Thing, NotFound, Error> thingOrNotFoundOrError = GetThingFromDb(id);

if (thingOrNotFoundOrError.TryPickT1(out NotFound notFound, out var thingOrError)) //thingOrError is a OneOf<Thing, Error>
return StatusCode(404);
Expand Down