title: LINQ to Entity: using Contains in the "select" portion throws unexpected error
body: <p>I've got a LINQ query going against an Entity Framework object. Here's a summary of the query:</p>
  
  <pre><code>//a list of my allies
  List&lt;int&gt; allianceMembers = new List&lt;int&gt;() { 1,5,10 };
  
  //query for fleets in my area, including any allies (and mark them as such)
  var fleets = from af in FleetSource
               select new Fleet 
               {
                   fleetID = af.fleetID,
                   fleetName = af.fleetName,
                   isAllied = (allianceMembers.Contains(af.userID) ? true : false)
               };
  </code></pre>
  
  <p>Basically, what I'm doing is getting a set of fleets. The allianceMembers list contains INTs of all users who are allied with me. I want to set isAllied = true if the fleet's owner is part of that list, and false otherwise.</p>
  
  <p>When I do this, I am seeing an exception: "LINQ to Entities does not recognize the method 'Boolean Contains(Int32)' method"</p>
  
  <p>I can understand getting this error if I had used the contains in the where portion of the query, but why would I get it in the select? By this point I would assume the query would have executed and returned the results. This little ditty of code does nothing to constrain my data at all.</p>
  
  <p>Any tips on how else I can accomplish what I need to with setting the isAllied flag?</p>
  
  <p>Thanks</p>