I have this interface
public interface ICartService : IService<Cart>
{
...
}
Implementation of the interface
public class CartService : ICartService
{
public CartService(ICartRepository repository)
{
_repository = repository;
}
...
}
And in web.config
<StructureMap MementoStyle="Attribute">
<DefaultInstance Key="CartService" PluginType="xxxx.Catalog.Services.ICartService,xxxx.Catalog" PluggedType="xxxx.Catalog.Services.Default.CartService,xxxx.Catalog" Scope="Singleton" />
</StructureMap>
of course I called on app start:
ObjectFactory.Initialize(y =>
{
y.PullConfigurationFromAppConfig = true;
});
and getting error No Default Instance defined for PluginFamily xxxx.Catalog.Services.ICartService, xxxx.Catalog
Any ideas what am I doing wrong?