我是新来的国际奥委会和结构地图,但我想知道如何我可以注册不同的类实现从相同的接口实现例如IRepository实现CustomerRepository和CategoryRepository。 而且,你可以看到,如果我可以使用这个泛型类型。 像仓库或储存库通用存储库结构图国际奥委会问题
x.ForRequestedType<IRepository<Category>>().TheDefault.Is.OfConcreteType<IRepository<Category>>();
试该位它没有worked..any帮助对子级不胜感激!
我不知道StructureMap是如何工作的,但我会写出'Is.OfConcreteType>'。 'Repository','Repository','Repository',而不是'IRepository'。 –
LukLed
2009-12-22 18:53:03