Skip to content

Dependency injection

Alexanderius edited this page Jun 7, 2024 · 3 revisions

Dependency injection

Dependency injection is used by default using Simplify.DI IOC container for all classes in Simplify.Web including user's controllers and views.

  • Controllers and views registered automatically in IOC container when framework starts by passing true parameter to UseSimplifyWeb or UseSimplifyWebNonTerminal methods or manually calling RegisterSimplifyWeb on IDIRegistrator interface of IOC container;
  • If your controllers or views uses constructor injection, then you should register that dependencies before web application starts or before manual call of IOC container Verify method.

Please refer to Simplify.DI for registration details.

<< Previous page Next page >>

Clone this wiki locally