저는 상업 거래를 사용하고 있습니다.이 개체에 대해 정의 된 매개 변수없는 생성자가 없습니다.-nop commerce 2.6
카탈로그 컨트롤러에 새 서비스 클래스를 추가합니다.
그런 다음이 오류가 발생합니다.
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.
Source Error:
Line 3: @foreach (var widget in Model)
Line 4: {
Line 5: @Html.Action(widget.ActionName, widget.ControllerName, widget.RouteValues)
Line 6: }
Source File: f:\project\sitename\Presentation\Nop.Web\Views\Widget\WidgetsByZone.cshtml Line: 5
이 컨트롤러를 변경했습니다.
public CatalogController(ICategoryService categoryService,
IManufacturerService manufacturerService)
public CatalogController(ICategoryService categoryService,
IManufacturerService manufacturerService, IbookService bookService)
에 그런 다음 오류가 발생했습니다.
어떻게 해결할 수 있습니까?
IProductService 인터페이스를 등록하지 않은 경우 발생하는 오류와 비슷합니다. 유형을 올바르게 등록 했습니까? – Carth