title: Lambda expression returning error
body: <p>This is my code:</p>
  
  <pre><code>SomeFunction(m =&gt; { 
      ViewData["AllEmployees"].Where(c =&gt; c.LeaderID == m.UserID); 
   })
  </code></pre>
  
  <p>and it returns this error:</p>
  
  <p>Not all code paths return a value in lambda expression of type <code>System.Func&lt;IEnumerable&gt;</code></p>