title: Cannot implicitly convert type System.Linq.IQueryable<string> to string
body: <p>I have two tables named Rank and CrewMembers.I want to fetch the name of rank which is present in Rank table on the basis of id of CrewMember.I have passed the crewId as a parameter and on the basis of that the method would return the Rank of that specific Crew Member.This is how my code is-</p>
  
  <pre><code>       public string GetRank(int CrewId)
         {
  
          string rank = (from r1 in context.Rank
              join r2 in context.CrewMember on r1.RankId equals r2.RankId
              where r2.CrewId == CrewId
              select r1.RankName);
  
          return rank;
        }
  </code></pre>
  
  <p>When I build the code ,I get the following error-</p>
  
  <blockquote>
    <p>Cannot implicitly convert type System.Linq.IQueryable to string</p>
  </blockquote>
  
  <p>where am I going wrong?</p>