Onion Architecture and Registering Dependencies in DI Container

与世无争的帅哥 提交于 2019-12-03 20:09:09

Most of the time this is done by making the container aware of the DAL (via configuration) and sticking the DAL's assemblies in the same directory as the UI or other well-known location (the GAC, etc). In Spring.NET you'd add the DAL's types in the spring configuration file. In Castle Windsor, you can include a class implementing IWindsorInstaller in each DLL that has types to be registered in the IoC container, and in the UI tell the container to go find all components in a certain directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!