title: Suitable constructor for type not found (View Component)
body: <p>View Component:</p>
  
  <pre><code>public class WidgetViewComponent : ViewComponent
  {
      private readonly IWidgetService _WidgetService;
  
      private WidgetViewComponent(IWidgetService widgetService)
      {
          _WidgetService = widgetService;
      }
  
      public async Task&lt;IViewComponentResult&gt; InvokeAsync(int widgetId)
      {
          var widget = await _WidgetService.GetWidgetById(widgetId);
          return View(widget);
      }
  }
  </code></pre>
  
  <p>In the view ~/Views/Employees/Details.cshtml</p>
  
  <pre><code>@await Component.InvokeAsync("Widget", new { WidgetId = Model.WidgetId } )
  </code></pre>
  
  <p>The view component is located at ~Views/Shared/Components/Widget/Default.cshtml</p>
  
  <p>The error I receive is below:</p>
  
  <blockquote>
    <p>InvalidOperationException: A suitable constructor for type 'MyApp.ViewComponents.WidgetViewComponent' could not be located. Ensure the type is concrete and services are registered for all parameters of a public constructor.</p>
  </blockquote>