Skip to content

Dependency injection

Alexanderius edited this page Dec 22, 2019 · 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 registers automatically in IOC container when framework starts;
  • If your controllers or views uses constructor injection, then you should register that dependencies before app.UseSimplifyWeb(); call.
  • When using UseSimplifyWebWithoutRegistrations or UseSimplifyWebNonTerminalWithoutRegistrations internal Simplify.Web types and user controllers/views types will not be registered in Simplify.DI container. This allows us to control IOC registrations. To manually register Simplify.DI and controller/views types please use RegisterSimplifyWeb() extension method of IDIContainerProvider.

Please refer to Simplify.DI for registration details.

<< Previous page Next page >>

Clone this wiki locally