2

我有两个程序集EDC2.DALEDC2,其中 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 中的相应实现者实现。

谁能告诉我该怎么做?

4

1 回答 1

0

在这里找到解决方案:

AllTypes.Pick().FromAssemblyNamed("EDC2.DAL").If(x => !x.IsGenericType).WithService.FirstInterface()
于 2009-01-16T01:37:01.497 回答