3 ms·
Sure, you can use it like that, but it's not considered good practice. I think the context missing here is that most modern C# applications are going to be asyn
by Hawxy 2y ago
Sure, you can use it like that, but it's not considered good practice. I think the context missing here is that most modern C# applications are going to be async all of the way down. The entry point can be async. Background service abstractions are async. Your API endpoints in ASP.NET Core are typically async as you're going to be calling some async I/O anyways (database queries, HTTP clients). There's no benefit to writing something in the old callback model when the rest of your code is async/await anyways.