Dependency Injection interview questions

15 real Dependency Injection questions from the ASP.NET Core bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Built-in DI container?

Junior
  1. A.a registration where one instance is created per client request and reused within that request
  2. B.the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  3. C.a registration where a single instance is created once and shared for the entire application lifetime
  4. D.the preferred technique of receiving required services as parameters of a type's constructor
Reveal the answer + AI explanation — free account

2. Which term means: "the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs"?

Junior
  1. A.Singleton lifetime
  2. B.Scoped lifetime
  3. C.Built-in DI container
  4. D.Transient lifetime
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Built-in DI container — the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  2. B.Built-in DI container — a registration where a single instance is created once and shared for the entire application lifetime
  3. C.Built-in DI container — the preferred technique of receiving required services as parameters of a type's constructor
  4. D.Built-in DI container — a registration where one instance is created per client request and reused within that request
Reveal the answer + AI explanation — free account

4. What is Constructor injection?

Junior
  1. A.the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  2. B.a registration where a single instance is created once and shared for the entire application lifetime
  3. C.a registration where one instance is created per client request and reused within that request
  4. D.the preferred technique of receiving required services as parameters of a type's constructor
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.Constructor injection — a registration where a single instance is created once and shared for the entire application lifetime
  2. B.Constructor injection — the preferred technique of receiving required services as parameters of a type's constructor
  3. C.Constructor injection — a registration where a new instance of the service is created every time it is requested
  4. D.Constructor injection — the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
Reveal the answer + AI explanation — free account

7. What is Transient lifetime?

Mid
  1. A.a registration where a new instance of the service is created every time it is requested
  2. B.the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  3. C.a registration where one instance is created per client request and reused within that request
  4. D.the preferred technique of receiving required services as parameters of a type's constructor
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Mid
  1. A.Transient lifetime — a registration where a single instance is created once and shared for the entire application lifetime
  2. B.Transient lifetime — a registration where one instance is created per client request and reused within that request
  3. C.Transient lifetime — the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  4. D.Transient lifetime — a registration where a new instance of the service is created every time it is requested
Reveal the answer + AI explanation — free account

10. What is Scoped lifetime?

Mid
  1. A.a registration where a single instance is created once and shared for the entire application lifetime
  2. B.the preferred technique of receiving required services as parameters of a type's constructor
  3. C.a registration where one instance is created per client request and reused within that request
  4. D.the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.Scoped lifetime — a registration where a single instance is created once and shared for the entire application lifetime
  2. B.Scoped lifetime — a registration where one instance is created per client request and reused within that request
  3. C.Scoped lifetime — the preferred technique of receiving required services as parameters of a type's constructor
  4. D.Scoped lifetime — a registration where a new instance of the service is created every time it is requested
Reveal the answer + AI explanation — free account

13. What is Singleton lifetime?

Mid
  1. A.a registration where a new instance of the service is created every time it is requested
  2. B.the preferred technique of receiving required services as parameters of a type's constructor
  3. C.the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  4. D.a registration where a single instance is created once and shared for the entire application lifetime
Reveal the answer + AI explanation — free account

14. Which term means: "a registration where a single instance is created once and shared for the entire application lifetime"?

Mid
  1. A.Constructor injection
  2. B.Built-in DI container
  3. C.Singleton lifetime
  4. D.Scoped lifetime
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.Singleton lifetime — a registration where a new instance of the service is created every time it is requested
  2. B.Singleton lifetime — the framework-provided inversion-of-control system that creates and supplies objects a class declares it needs
  3. C.Singleton lifetime — the preferred technique of receiving required services as parameters of a type's constructor
  4. D.Singleton lifetime — a registration where a single instance is created once and shared for the entire application lifetime
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Dependency Injection free