title: Cannot convert lambda expression to delegate type
body: <p>I'm trying to grab the first user from a <strong>SQL</strong> database using <code>Entity model</code> that is talking to a already existing database that has a <em>userID</em> of the user I am looking for. This and a second error appear.</p>
  
  <blockquote>
    <p>Cannot convert lambda expression to delegate type
    <code>System.Func&lt;iomnientitylibrary.user,bool&gt;</code> because some of the
    <strong>return</strong> types in the block are not implicitly convertible to the delegate <strong>return</strong> type.</p>
  </blockquote>
  
  <p>Cannot implicitly convert type <code>int</code> to <code>bool</code>.</p>
  
  <pre><code>public user GetUser(int userID)
  {
       using (var context = new iomniEntities())
      {
          user u = context.users.FirstOrDefault(user =&gt; user.userID);
  
          return u;
      }
  }
  </code></pre>
  
  <p><code>context.users.ToList()</code> is working properly but I don't want to be <strong>that inefficient</strong>.</p>