Dependency injection - SimplifyNet/Simplify.Web GitHub Wiki
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
trueparameter toUseSimplifyWeborUseSimplifyWebNonTerminalmethods, or by manually callingRegisterSimplifyWebon theIDIRegistratorinterface 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
Verifymethod.
Please refer to Simplify.DI for registration details.