title: Linq to Entities Join -- I don't want anonymous types
body: <p>I have two tables that are related via a mapping table: </p>
  
  <ol>
  <li><code>keywords</code></li>
  <li><code>titles</code></li>
  </ol>
  
  <p>I am trying to return a list of <code>Map_Keywords_Title</code> (the mapping table's object) based on the results of a join.  </p>
  
  <p>Until I added the last part with <code>typedQuery</code> it was just returning objects of anonymous type.  I want it to return items of type <code>Map_Keywords_Title</code> so I tried adding the Select at the end (also tried Cast but that failed).  The problem now is that the resulting objects are not managed by entity framework so I can't save changes to them.  </p>
  
  <p>Is there no straightforward way to do this in Linq to Entities?  I'm using VS2008 so I don't yet have the new EF.  </p>
  
  <pre><code>    public IList&lt;Map_Keywords_Title&gt; MatchingTitleKeywordMappings(string containedInText)
      {
          var keywords = QueryKeywords();
          if (!string.IsNullOrEmpty(containedInText))
          {
              Expression&lt;Func&lt;Keyword, bool&gt;&gt; exprContainsKeyword = k =&gt; containedInText.Contains(k.WordText);
              keywords = keywords.Where(exprContainsKeyword);
          }
          var maps = QueryMap_Keywords_Title();
          var anonQuery = keywords.Join(
              maps,
              key =&gt; (int)key.Id,
              map =&gt; (int)map.Keyword.Id,
              (key, map) =&gt; new
              {
                  map.Id,
                  map.Keyword,
                  map.Title
              });
          var typedQuery = anonQuery.ToList().Select(anon =&gt; new Map_Keywords_Title()
              {
                  Id = anon.Id,
                  Keyword=anon.Keyword,
                  Title=anon.Title
              });
  
          return typedQuery.ToList();
      }
  </code></pre>