-
Notifications
You must be signed in to change notification settings - Fork 5
IoC Containers
Antler framework has an abstraction level over IoC containers. And it's very easy to switch between the different IoC containers.
Currently we have the following adapters for IoC containers (and have plans to add more in the near future):
- Castle Windsor
- StructureMap
- Antler's Built-in container
To use Castle Windsor adapter for Antler Framework you need to install Antler.Windsor package from NuGet and use UseWindsorContainer() command:
var configurator = new AntlerConfigurator(); configurator.UseWindsorContainer();
To use StructureMap adapter for Antler Framework you need to install Antler.StructureMap package from NuGet and use UseStructureMapContainer() command:
var configurator = new AntlerConfigurator(); configurator.UseStructureMapContainer();
To use Built-in adapter for Antler Framework you need to use UseBuiltInContainer() command:
var configurator = new AntlerConfigurator(); configurator.UseBuiltInContainer();
Currently Built-in container is suited only for simple use cases. For example, when you just want to use some ORM and don't want to work with a container directly.