© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
4 replies
Exi

✅ await in computed property?

hello, i have my blazorwasm app and a razorpage with a few checkboxes. if I check or uncheck a checkbox I want to call a function to fetch data.

my component (mudblazor):

<MudCheckBox @bind-Checked="@missing_column_statistics" Label="missing_column_statistics" Color="Color.Primary">
</MudCheckBox>

private bool _missing_column_statistics = false;
public bool missing_column_statistics
{
get => _missing_column_statistics;
set
{
_missing_column_statistics = value;
SearchExtendedEvents(); // he wants await here
}
}

my SearchExtendedEvents is a async task (public async Task SearchExtendedEvents()) and because of that its crying for await but I cant just add it.
I've googled a little bit and found smth like that:

set
{
_optimizer_timeout = value;
new Task(async () =>
{
await SearchExtendedEvents();
}).Start();
}

but idk if thats a good way to do it.
Maybe my way of doing this is bad anyways and maybe someone can give me advice how to handle this.

Thanks
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ await in c#
C#CC# / help
2y ago
✅ await await ContinueWith
C#CC# / help
9mo ago
Async await in minimal API
C#CC# / help
2y ago
await-work in thread class is different from await-work in task class?
C#CC# / help
2y ago