title: Entity Framework - Cannot convert lambda expression to type 'string' because it is not a delegate type
body: <p>I am using Entity Framework in my C# based code.  I am running into an unexpected weirdness and am looking for suggestions.</p>
  
  <p>Case 1, 2, 3, 4...
  Projects:<br>
  RivWorks.dll<br>
  RivWorks.Service.dll<br>
  RivWorks.Alpha.dll  </p>
  
  <p>Samples (all of these work):<br/>
  <strong>RivWorks.Alpha.dll:</strong></p>
  
  <pre><code>public static bool EndNegotitation(long ProductID)
  {
      var product = (from a in _dbFeed.AutoWithImage 
                     where a.AutoID == ProductID select a).FirstOrDefault();
  ...
  }
  </code></pre>
  
  <p><strong>RivWorks.Service.dll</strong></p>
  
  <pre><code>public static RivWorks.Model.NegotiationAutos.AutoWithImage 
      GetProductById(long productId)
  {
      var myProduct = from a in _dbFeed.AutoWithImage 
                      where a.AutoID == productId select a;
  
      return myProduct.FirstOrDefault();
  }
  public static List&lt;RivWorks.Model.NegotiationAutos.AutoWithImage&gt; 
      GetProductByCompany(Guid companyId)
  {
      var myProduct = from a in _dbFeed.AutoWithImage 
                      where a.CompanyID == companyId select a;
  
      return myProduct.ToList();
  }
  </code></pre>
  
  <p>etc</p>
  
  <p>Case "weirdness":<br>
  RivWorks.Web.Service.dll (WCF project)<br>
  Contains the same references as the other projects.</p>
  
  <pre><code>public NegotiateSetup GetSetup(string method, string jsonInput)
  {
      ...
      long.TryParse(ProductID, out result);
      var product = (from a in _dbFeed.AutoWithImage 
                     where a.AutoID == result select a).FirstOrDefault();
      ...
  }
  </code></pre>
  
  <p>I am getting this compile time error (the word "where" is highlighted in my editor):<br/>
  <em>Cannot convert lambda expression to type 'string' because it is not a delegate type</em><br/></p>
  
  <p>Any ideas what would cause this?</p>