StructureMap auto registration of generic types that are not referenced

70 Views Asked by At

I am getting this error: No Default Instance defined for PluginFamily IReadModelRepository

This is my registry

    public class DependencyRegistry : Registry
    {
        public DependencyRegistry()
        {
            //Must reference ReadModelRepository dll or get the above error
            //For(typeof(IReadModelRepository<>)).Use(typeof(ReadModelRepository<>));

            Scan(x =>
            {
                x.AssembliesFromApplicationBaseDirectory();
                x.WithDefaultConventions();
            });
        }
    }

Is there a way to get the above registry working without the explicit reference to the ReadModelRepository?

0

There are 0 best solutions below