title: Render partial view from controller
body: <p>I have a controller <code>ItemsController</code> that has an instance method <code>GetRecent()</code> which returns <code>IQueryable&lt;Item&gt;</code></p>
  
  <p>In the index page of my application I want to render a partial view <code>_Recent.cshtml</code> using the results from <code>ItemsController.GetRecent()</code></p>
  
  <p>To do this, I've written the following in my Index.cshtml</p>
  
  <p>I've added namespace references to the ~/Views/web.config so I don't need to write out the controllers full namespace</p>
  
  <pre><code>    @{
          ViewBag.ItemsController = new ItemsController();
      }
  
      ...
  
      @Html.Partial("~/Views/Items/_Recent.cshtml",
                     ((ItemsController)ViewBag.ItemsController).GetRecentItems())
  </code></pre>
  
  <p>I thought of passing <code>new ItemsController().GetRecentItems()</code> directly or turning <code>GetRecentItems()</code> into a static method however I'm not sure what direction this should take.</p>
  
  <p>I want to know if this is an accepted way of building a partial view from a controller and if not, how can this be accomplished more efficiently?</p>