Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-nitehawk committed Oct 31, 2022
1 parent 9340521 commit 4fb22e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/docs/[...5]dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public override async Task HandleAsync(CancellationToken ct)

Validators are singletons for [performance reasons](/benchmarks). Constructor injection as well as the above-mentioned **\*Resolve()** methods are available for validators to get access to the dependencies. Take care not to maintain state in the validator unless that data is also singleton/static.

Tring to resolve a scoped dependency in the constructor will cause an error to be thrown. Scoped dependencies can be resolved in the constructor by creating a new scope and disposing it as shown below:
Trying to resolve a scoped dependency in the constructor will cause an error to be thrown. Scoped dependencies can be resolved in the constructor by creating a new scope and disposing it as shown below:

```cs title=MyValidator.cs
public class MyValidator : Validator<Request>
Expand Down

0 comments on commit 4fb22e5

Please sign in to comment.