title: The data types text and nvarchar are incompatible in the equal to operator
body: <p>this is my code</p>
  
  <p><strong>ProductController.cs</strong></p>
  
  <pre><code>public ActionResult Details(string id)
  {
      product productx = productDB.products.Single(pr =&gt; pr.Product1 == id);
      return View(productx);
  
  
  }
  </code></pre>
  
  <p><strong>Details.aspx</strong></p>
  
  <pre><code>    &lt;td&gt;
          &lt;%-- : Html.ActionLink("Edit", "Edit", new { id=item.Id }) % --&gt; 
          &lt;%: Html.ActionLink("Details", "Details", new { id = item.Product1 })%&gt;
      &lt;/td&gt;
  </code></pre>
  
  <p>this is what im using to list some products from a sql database, each product have a link to a Details page to show more informations about it</p>
  
  <p>what Im trying is to only put the product label in that link to let it show something like <strong>www.mysite.com\products\battery</strong> (not the id)</p>
  
  <p>I've imagined this should work, but it throw an <strong>The data types text and nvarchar are incompatible in the equal to operator.</strong> error and 
  neither <code>(pr =&gt; pr.Product1.Equals(id));</code> works</p>
  
  <p>the error is clear and Im asking how should I do to make it work this way ?</p>
  
  <p>thanks</p>