I am trying to access the productservice in my OrderService like below but it throws error
No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMethodException: No parameterless constructor defined for this object.
//Many repositories are here just like 3 belows
private readonly IRepository<Store> _storeRepository;
private readonly IRepository<ProductPicture> _productPictureRepository;
private readonly IRepository<Picture> _picture;
private readonly IProductService _productService;
//private readonly IProductService _productService = EngineContext.Current.Resolve<IProductService>();
//tried above line but with no success
//Constructor for OrderService goes below
public OrderService(IRepository<Store> storeRepository,
IProductService productService
)
{
_storeRepository = storeRepository;
_productService= productService;
}
If I remove reference for productService, application works well. I searched alot on web and on nopcommerce forum, but didnt find any solutions.
Any help?