I get the following warning in JetBrains Rider and I can't find a way to workaround it.It's a blazor WASM project with .net 6.
Avoid using 'async' lambda when delegate type returns 'void'
Sample code Razor:
<Validation Validator="async e => await ValidateFieldAsync(e)">Sample code c#:
protected async Task ValidateFieldAsync(ValidatorEventArgs args){ // Some code with awaits etc.}Jetbrains describes this warning here:
https://www.jetbrains.com/help/resharper/AsyncVoidLambda.html
But what is the best practice here to fix this?
Thanks for any hints!