Running async tasks on app startup in ASP.NET Core (Part 1)

added by DotNetKicks
1/8/2019 10:29:24 AM

2 Kicks, 321 Views

Sometimes you need to perform one-off initialisation logic before your app starts up properly. For example, you might want to validate your configuration is correct, populate a cache, or run database migrations. In this post, I look at the options available and show some simple methods and extension points that I think solve the problem well.