我是新來的國際奧委會和結構地圖,但我想知道如何我可以註冊不同的類實現從相同的接口實現例如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