title: Expression Cast Error - No coercion operator is defined between types
body: <p>In my Data Repository I have a base class and derived class as below.</p>
  <pre><code>public abstract class RepositoryBase&lt;T&gt; : IRepository&lt;T&gt; where T : EntityBase
  {
      public async Task&lt;T&gt; FindOneAsync(Expression&lt;Func&lt;T, bool&gt;&gt; predicate)
      {
          List&lt;T&gt; list = await SearchForAsync(predicate);
          return list.FirstOrDefault();
      }
  }
  
  public class CommentUrlRepository : RepositoryBase&lt;CommentUrl&gt;, ICommentUrlRepository
  {
      public async Task&lt;CommentUrlCommon&gt; FindOneAsync(
          Expression&lt;Func&lt;CommentUrlCommon, bool&gt;&gt; predicate
      )
      {
          Expression&lt;Func&lt;CommentUrl, bool&gt;&gt; lambda = Cast(predicate);
          CommentUrl commentUrl = await FindOneAsync(lambda);
          return MappingManager.Map(commentUrl);
      }
  
      private Expression&lt;Func&lt;CommentUrl, bool&gt;&gt; Cast(
          Expression&lt;Func&lt;CommentUrlCommon, bool&gt;&gt; predicate
      )
      {
          Expression converted =
              Expression.Convert(
                  predicate,
                  typeof(Expression&lt;Func&lt;CommentUrl, bool&gt;&gt;)
              );
  
          // throws exception
          // No coercion operator is defined between types
          return Expression.Lambda&lt;Func&lt;CommentUrl, bool&gt;&gt;(converted, predicate.Parameters);
      }
  }
  </code></pre>
  <p>When I hit &quot;Cast&quot; function I am getting following error:</p>
  <blockquote>
  <p>No coercion operator is defined between types 'System.Func`2[CommentUrlCommon,System.Boolean]' and 'System.Linq.Expressions.Expression`1[System.Func`2[CommentUrl,System.Boolean]]'.</p>
  </blockquote>
  <p>How can I cast this Expression value?</p>