I'm writing a plugin.
When i override a service. it's ok but when i ovveride a factory, its not ok.
This is my plugin code.
DependencyRegistrar :
public class DependencyRegistrar : IDependencyRegistrar
{
public void Register(ContainerBuilder builder, ITypeFinder typeFinder, NopConfig config)
{
builder.RegisterType<ProductServiceCustom>().As<IProductService>().InstancePerLifetimeScope();
builder.RegisterType<ProductModelFactoryCustom>().As<IProductModelFactory>()
.WithParameter(ResolvedParameter.ForNamed<ICacheManager>("nop_cache_static"))
.InstancePerLifetimeScope();
}
public int Order
{
get { return 1; }
}
}
ProductServiceCustom :
public partial class ProductServiceCustom : ProductService
public override IPagedList<Product> SearchProducts
ProductModelFactoryCustom :
public partial class ProductModelFactoryCustom : ProductModelFactory
public override IEnumerable<ProductOverviewModel> PrepareProductOverviewModels
What's the problem ? I have no error
Thx :-)