Skip to content

Dependency injection

Alexanderius edited this page Jul 3, 2025 · 4 revisions

Dependency injection

Dependency injection is used by default via the Simplify.DI IOC container for all classes in Simplify.Web, including user controllers and views.

  • Controllers and views are registered automatically in the IOC container when the framework starts by passing the true parameter to UseSimplifyWeb or UseSimplifyWebNonTerminal methods, or by manually calling RegisterSimplifyWeb on the IDIRegistrator interface of the IOC container.
  • If your controllers or views use constructor injection, you should register those dependencies before the web application starts or before manually calling the IOC container's Verify method.

Please refer to Simplify.DI for registration details.

<< Previous page Next page >>

Clone this wiki locally