Sep 27, 2011 at 7:07 PM
Edited Oct 3, 2011 at 9:10 AM
I'm not sure whether this is and Orchard or an Autofac issue.
I have the following interface:
public interface IMyService<TPart, TRecord> : IDependency
...and the following class implementing it:
public class MyService<TPart, TRecord> : IMyService<TPart, TRecord>
Now this fails:
with the message "The requested service 'MyModule.Services.IAssociativyService`2[[MyModule.Models.MyPart, App_Web_3z5ipzqi, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[MyModule.Models.MyRecord, App_Web_3z5ipzqi, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=null]]' has not been registered."
Trying to inject the IMyService instance in the constructor fails equally.
As I have seen with IMapper<TSource, TTarget> generic IDependencies are supported. The above code only works (but then it works) if the interface is not generic.
Any help would be greatly appreciated, as I'm quite clueless now.