title: How to Execute String formatted LINQ query in c# MVC3
body: <pre><code>     public ActionResult GenerateReport(FormCollection Form)
          {
              var type_id = Form["type_id"];           
              var Start_Date = Form["Start_Date"];
  
              StringBuilder sb = new StringBuilder();          
              sb.Append("db.contracts.Where(");
              if (!type_id.Equals(null))
              {
                  sb.Append("a =&gt; a.type_id == type_id");
              }
  
              if (!Start_Date.Equals(null))
              {
                  sb.Append("&amp;&amp; a =&gt; a.Start_Date == Start_Date");
              }
              sb.Append(");");
             //here I need to run the query!!
              return View(cm);
          }
  </code></pre>
  
  <p>How can i  execute this LINQ query in C#,
  I just want to run the query and get the results..</p>
  
  <p>Please help me...</p>
  
  <p>Thanks in Advance...</p>