title: System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Html.IHtmlContent] in ViewComponent Section of View
body: <p>I am new to view component and don't understand why I am getting this error at all.</p>
  
  <pre><code>public class Last6ClosedJobsViewComponent :  ViewComponent
  {
      private readonly Eva804Context ctx;
  
      public Last6ClosedJobsViewComponent(Eva804Context context)
      {
          ctx = context;
      }
  
      public IViewComponentResult Invoke(int id)
      {
          var jobs = from j in ctx.Job
                     .Include(j =&gt; j.Site)
                     .Include(j =&gt; j.WaterBody)
                     .Where(j =&gt; j.Site.SiteID == id &amp;&amp; j.InvoiceDate != null)
                     .OrderByDescending(j =&gt; j.BookingDate)
                     .Take(6)
                     select j;
  
          return View(jobs);
      }
  
  }
  </code></pre>
  
  <p>Then in the default view I am simply trying to show a  list of booking dates, at this stage:</p>
  
  <pre><code>@model IEnumerable&lt;Eva804.Models.Job&gt;
  
  &lt;h3&gt;Recently Invoiced Jobs&lt;/h3&gt;
  &lt;ul&gt;
  @foreach (var j in Model)
  {
      &lt;li&gt;@j.BookingDate&lt;/li&gt;
  
  }
  &lt;/ul&gt;
  </code></pre>
  
  <p>Then in site details I have the following:</p>
  
  <pre><code>&lt;div class="alert alert-success"&gt;@Component.InvokeAsync("Last6ClosedJobs",Model.SiteID)&lt;/div&gt;
  </code></pre>
  
  <p>All of which looks correct as far as I can see, compared to the examples I am working against.</p>
  
  <p>This is then showing in the view a loverly green section, nice and wording as:
  System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Html.IHtmlContent]</p>
  
  <p>How do I find this error?  Where should I look?  Is there something wrong with my code I cant see?</p>