Skip to content

Commit

Permalink
Fixes variable name for Minimal API example (#1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
guerra08 committed Aug 29, 2022
1 parent 36b81c5 commit 3635387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/aspnet.md
Expand Up @@ -209,9 +209,9 @@ builder.Services.AddScoped<IPersonRepository, PersonRepository>();

app.MapPost("/person", async (IValidator<Person> validator, IPersonRepository repository, Person person) =>
{
ValidationResult result = await validator.ValidateAsync(person);
ValidationResult validationResult = await validator.ValidateAsync(person);

if (!result.IsValid)
if (!validationResult.IsValid)
{
return Results.ValidationProblem(validationResult.ToDictionary());
}
Expand Down

0 comments on commit 3635387

Please sign in to comment.