The Background on Background Tasks in .NET 6

Scott Sauber

View at original site


Need to run a task in the background in .NET 6? There are lots of scenarios for background tasks, ranging from a task that runs for a long time to perhaps an operation that needs to be retried multiple times if it fails, and many other scenarios in between. While there are lots of scenarios for background tasks, there are also lots of solutions to this problem – so many, in fact, that .NET developers can sometimes be unsure of which one to choose. Such solutions include IHostedServices, BackgroundServices, Worker Services, Hangfire, and more. In this talk, we'll break down all of these solutions, go over their pros and cons, and discuss when to choose one over the other. We’ll also take a deep dive to see how they all work under the hood.

About the Presenter

Scott Sauber Director of Engineering at Lean TECHniques Inc

Scott is a software consultant and primarily does web development using ASP.NET Core and JavaScript. His second dev passion behind web development is building DevOps pipelines and automating everything automatable. He’s a Friend of Redgate and co-organizes the Iowa .NET User Group. You can find Scott on Twitter or on his blog at scottsauber.com.

Related Resources

C# 11 - Required Keyword
Introducing the required keyword for fields and properties.
C# 11 - Raw strings
There is no escape!