Inhalte aufrufen

Profilbild

Extending Project

Model Extending Controller Service

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
1 Antwort zu diesem Thema

#1 Aaron Jones

Aaron Jones

    Newbie

  • Members
  • Punkt
  • 1 Beiträge

Geschrieben: 12 February 2016 - 22:42

I have been trying to extend the project. I created model under the admin project for Sub-Categories. This will have multiple sub-categories that can be applied to many categories.

 

I have created the Interface (ISubCategoryService) and the class (SubCategoryService) under the services project. When creating my controller and going to the page, I get the following error

 

None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'SmartStore.Admin.Controllers.SubCategoryController' can be invoked with the available services and parameters:

Is there a place that I have to register my SubCategoryService.cs file within the solution?



#2 Murat Cakir

Murat Cakir

    SmartStore AG

  • Administrators
  • 1118 Beiträge

Geschrieben: 13 February 2016 - 02:11

Is there a place that I have to register my SubCategoryService.cs file within the solution?

 

Yes. Either in SmartStore.Web.Framework/DependencyRegistrar.cs or any other custom class that implements IDependencyRegistrar.


Murat Cakir
SmartStore AG



Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: Model, Extending, Controller, Service