title: How to pass data to a partial view?
body: <p>I'm using ASP.NET MVC with Entity Framework. I have two queries to show separate tables in the same view.</p>
  
  <p>One is</p>
  
  <pre><code> var query = from s in db.tblSites
                          where s.SiteStatus== 1
                          select s;
  </code></pre>
  
  <p>and the other one is</p>
  
  <pre><code>var query2 = from s in db.tblSites
                              where s.SiteStatus== 0
                              select s;
  </code></pre>
  
  <p>So I' going to use the <code>@Html.RenderPartial</code></p>
  
  <p>But I don't know how to pass the data.</p>
  
  <p>I want to pass the <code>query2</code> data to my partial view.</p>
  
  <pre><code> @Html.Partial("RemoveContract",--------) //I don't know how to pass data.
  </code></pre>
  
  <p>This is my controller</p>
  
  <pre><code> public ActionResult AddContract(int id)
          {
              var query = from s in db.tblSites
                              where s.SiteStatus== 1
                              select s;
  
      var query2 = from s in db.tblSites
                                  where s.SiteStatus== 0
                                  select s;
  
              return View(query .ToList());
  
          }
  </code></pre>
  
  <p>How to do it?</p>