title: Request only first item Entity Framework
body: <p>I'm looking for the most efficiant method to call the first and only the first item from a SQL Server database using Entityframework and linq. </p>
  
  <p>I'm currently using</p>
  
  <pre><code>public static UserProfile GetUserProfile(Guid userID)
      {
          UserProfile oProfile = null;
  
          using (var context = new MyEntities())
          {
              var profiles = from c in context.UserProfiles where c.UserID == userID select c;
  
              if(profiles.Any())
              {
                  oProfile = profiles.First();
              }
          }
  
          return oProfile;
      }
  </code></pre>
  
  <p>This however from what I can tell takes two DB ops to complete, one to check if the record exists and a second to return it. I'm sure there has to be a better pattern / method and I'm just not seeing it. </p>