title: Predicate in C# .NET Core
body: <p>I am still a beginner on .NET and .NET Core. I am not sure how the syntax of predicate works in .NET CORE. </p>
  
  <pre><code>  [HttpGet]
      public async Task&lt;IEnumerable&lt;TodoItem&gt;&gt; GetAllAsync()
      {
          var items = await DocumentDBRepository&lt;TodoItem&gt;.GetItemsAsync(t =&gt; t.IsComplete);
          return items;
      }
  </code></pre>
  
  <p>The GetItemsAsync() from above code <strong>has red underline in the .NET Core framework but not the .NET framework.</strong> </p>
  
  <p>The signature of the GetItemAsync() is:</p>
  
  <pre><code>public static async Task&lt;IEnumerable&lt;T&gt;&gt; GetItemsAsync(Expression&lt;Func&lt;T, bool&gt;&gt; predicate)
  </code></pre>
  
  <p>The error message is </p>
  
  <pre><code>&gt; "The call is ambiguous between the following methods or properties:
  &gt; "DocumentDBRepository&lt;T&gt;.GetItemsAsync(Expression&lt;Func&lt;T, bool&gt;&gt;)" and
  &gt; "DocumentDBRepository&lt;T&gt;.GetItemsAsync(Func&lt;TodoItem, body&gt;)"
  </code></pre>
  
  <p>Could someone explain why? </p>