Bootstrapping data on startup

This article is a general recommendation for setting up data on startup. This can be useful when bootstrapping a project and setting up Data Types, Definitions, and other entities.

When to create the data?

We recommend placing the logic for creating data into a HostedService. By inheriting BackgroundService, you create a potentially long-running job activated once at app startup.

Read more about Background tasks on MicrosoftLearn.

Create the Service

Register the Service

Product Definitions & Fields

Last updated

Was this helpful?