Mid ASP.NET Core

Constructor injection vs property injection (and which is supported)?

  • Constructor Injection: Supported and preferred in ASP.NET Core.
  • Property Injection: Not supported natively in built-in DI; can be achieved via custom

logic or 3rd-party containers.

✅ Use constructor injection for immutability and clarity.

More from ASP.NET Core Tutorial

All questions for this course