servicestack with funq - autowiring by convention
问题 I have a service which takes an IMyDependency in its constructor. IMyDependency, MyDependency and the service all live in the same assembly. MyDependency has a single, public, parameterless constructor. To my surprise, this did not work: container.RegisterAutoWired<IMyDependency>(); It throws a "System.NullReferenceException". It works if I do this: container.RegisterAutoWiredAs<MyDependency, IMyDependency>(); But then, so does this: container.RegisterAs<MyDependency, IMyDependency>(); So