title: Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'?
body: <p>I'm pretty new to C# and I'm getting an error I can't quite figure out? </p>
  
  <p>I have a view where I want to loop a series of nodes, so I'm trying do to this: </p>
  
  <pre><code>@foreach (var crumb in Model.Breadcrumb)
  {
    //My code
  }
  </code></pre>
  
  <p>As in my viewmodel I have this: </p>
  
  <pre><code>public IEnumerable&lt;LinkModel&gt; Breadcrumb(IPublishedContent content) {
      //Do logic. 
       return GetFrontpage(content, true).Reverse().Select(item =&gt; new LinkModel {
          Target = "",
          Text = item.Name,
          Url = item.Url
      }); 
  }
  
  private static IEnumerable&lt;IPublishedContent&gt; GetFrontpage(IPublishedContent content, bool includeFrontpage = false)
  {
      var path = new List&lt;IPublishedContent&gt;();
  
      while (content.DocumentTypeAlias != "frontpage")
      {
          if (content == null)
          {
              throw new Exception("No frontpage found");
          }
          path.Add(content);
          content = content.Parent;
      }
      if (includeFrontpage)
      {
          path.Add(content);
      }
      return path;
  }
  </code></pre>