title: check if record exists in database using LINQ
body: <p>I am getting a cast error here but I do not understand as to why.</p>
  
  <pre><code>protected bool isPlayerdb(string userName)
  {
      try
      {
          Users adminUsers = from users in SoccerEntities.Users
                             where users.roleId == new Guid("ED85788D-72DA-4D0A-8D5E-B5378FC00592") 
                             &amp;&amp; users.UserName == userName
                             select users;
  
          if (adminUsers != null)
              return true;
          else
              return false;
      }
      catch (Exception ex)
      {
          throw new EntityContextException("isPlayer failed.", ex);
      }
  }
  </code></pre>
  
  <p>Error in debugger is:</p>
  
  <blockquote>
    <p>Error 11  Cannot implicitly convert type 
    <code>'System.Linq.IQueryable&lt;soccerCmsDal.Users&gt;'</code> to 'soccerCmsDal.Users'. An explicit conversion exists (are you missing a cast?) C:\new code\UniteCms\UniteCms\soccerCmsDal\SocerDataAccess.cs   80  23  soccerCmsDal</p>
  </blockquote>