我有两个程序集 EDC2.DAL 和 EDC2 ,其中EDC2.DaoInterfaces为EDC2.Domain命名空间中的对象定义了一组数据访问对象的接口。这些都是由EDC2.DAL中的类实现的。
举个例子:
Assembly EDC2
Namespace EDC2.DaoInterfaces
ICustomerDao
IProductDao
Assembly EDC2.DAL
Namespace EDC2.DAL
CustomerDao : ICustomerDao
ProductDao : IProductDao
我想使用Windsor的流畅接口将EDC2.DaoInterfaces中的所有接口注册为由EDC2.DAL中相应的实现者实现。
谁能告诉我怎么做?
答案 0 :(得分:0)
找到解决方案here:
AllTypes.Pick().FromAssemblyNamed("EDC2.DAL").If(x => !x.IsGenericType).WithService.FirstInterface()