This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In-depth articles on Microsoft developer tools and technologies
Personalized learning paths and courses
Globally recognized, industry-endorsed credentials
Technical questions and answers moderated by Microsoft
Code sample library for Microsoft developer tools and technologies
Interactive, curated guidance and recommendations
Thousands of hours of original programming from Microsoft experts
Microsoft AI Skills Fest
April 8 - May 28, 2025
Which of the following statements is true regarding dependency injection?
Dependency injection is a design pattern that allows you to loosely couple your app's dependencies.
ASP.NET Core comes with a built-in service container that supports dependency injection.
ASP.NET Core's service container supports three service lifetimes: transient, scoped, and singleton.
All of the above.
What is the behavior of a service registered with the singleton service lifetime?
A new instance of the service is created for each request.
A single instance of the service is created for the lifetime of the app.
A new instance of the service is created each time an instance is requested.
None of the above.
What is the behavior of a service registered with the scoped service lifetime?
A new instance of the service is created for the current scope, like the current request.
You must answer all questions before checking your work.
Was this page helpful?