Setting Up a Container

Explore how we can set up a new container in our application.

To set up a new container, we use the di.New() function to create one and then use either AddSingleton() or AddScoped() to add our dependencies:

Get hands-on with 1400+ tech skills courses.