Suitable constructor for type not found (View Component)

The problem is that your constructor is private:

private WidgetViewComponent(IWidgetService widgetService)
{
    _WidgetService = widgetService;
}

It should be public otherwise the DI cannot access it:

public WidgetViewComponent(IWidgetService widgetService)
{
    _WidgetService = widgetService;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)