# Code patterns ## Composite [Example from Autofac doc](https://autofaccn.readthedocs.io/en/latest/advanced/composites.html) Composite pattern with dependency injection can be very useful to migrate from a Legacy service to a new service smoothly.