title: Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting EDM primitive or enumeration types
body: <pre><code>public ViewResult Medicament(string searchTerm)
      {
  
  
          if (!String.IsNullOrEmpty(searchTerm))
          {
             var Medicament = from s in db.MEDICAMENTs
                           from j in db.FOURNISSEURs
                           where s.ID_Fournisseur.Equals(j.CODE_FOUR) &amp;&amp;
                                 j.NOM_FOUR.Equals(searchTerm)
                           select s;
  
  
  
               return View(Medicament.ToList().Any());
          }
                  return View();
      }
  </code></pre>
  
  <p>I got this message:</p>
  
  <p>Unable to cast the type 'System.Int32' to type 'System.Object'. LINQ to Entities only supports casting EDM primitive or enumeration types.</p>