I have created new service class in nop.services project. I have to access this service object in common controller constructors.
For example.
private readonly ItestService _testservice;
public CommonController(ICategoryService categoryService, IProductService productService,
IManufacturerService manufacturerService, ITopicService topicService,
ILanguageService languageService,
ICurrencyService currencyService, ILocalizationService localizationService,
IWorkContext workContext,
IQueuedEmailService queuedEmailService, IEmailAccountService emailAccountService,
ISitemapGenerator sitemapGenerator, IThemeContext themeContext,
IThemeProvider themeProvider, IForumService forumService,
ICustomerService customerService, IWebHelper webHelper,
IPermissionService permissionService, IMobileDeviceHelper mobileDeviceHelper,
HttpContextBase httpContext, CustomerSettings customerSettings,
TaxSettings taxSettings, CatalogSettings catalogSettings,
StoreInformationSettings storeInformationSettings, EmailAccountSettings emailAccountSettings,
CommonSettings commonSettings, BlogSettings blogSettings, ForumSettings forumSettings,
LocalizationSettings localizationSettings, CaptchaSettings captchaSettings, ItestService testservice){
.
.
.
this._testservice= testservice;
.
.
.
}
When I run project, I am getting following errors.
No parameterless constructor defined for this object.
Can anybody help me to resolve this error? How can I add more parameters in controller constructors?
Thanks
Imrankhan