Dependency injection in ASP.NET Core MVC allows services to be injected into controllers via their _________.

  • Constructors
  • Properties
  • Methods
  • Fields
Dependency injection in ASP.NET Core MVC allows services to be injected into controllers via their constructors. This approach promotes the use of constructor injection for better testability and maintainability of your controllers, ensuring that required services are provided when the controller is created.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *