title: .NET Core 3 InvalidOperationException on OrderBy with dynamic field name
body: <p>I'm migrating an existing web API from .NET Core 2 o 3 version.
  After several problems, I manage to make it work, with the exception of Dynamic OrderBy by column name.</p>
  
  <p>This is my code, that worked great with .net core 2:</p>
  
  <pre><code>public async Task&lt;IEnumerable&lt;Clientes_view&gt;&gt; GetClientes(int bActivos, int nRegistroInic, int nRegistros, string sOrdenar, 
          int nSentido, string sFiltro, int nTipo = -1, int idCliente = -1)
      {
          var clientes = this.context.Set&lt;Clientes_view&gt;()
             .Where(e =&gt; e.RazonFantasia.Contains(sFiltro) || e.RazonFantasia.Contains(sFiltro)
                 || e.Cuit.Contains(sFiltro) || e.Mail.StartsWith(sFiltro) || string.IsNullOrEmpty(sFiltro))
             .Where(e =&gt; (e.Activo &amp;&amp; bActivos == 1) || bActivos == -1 || (!e.Activo &amp;&amp; bActivos == 0))
             .Where(e =&gt; e.IdTipoCliente == nTipo || nTipo == -1)
             .Where(e =&gt; e.IdCliente == idCliente || idCliente == -1);
  
          if (!string.IsNullOrEmpty(sOrdenar))
          {
              var propertyInfo = this.context.Set&lt;Clientes_view&gt;().First().GetType().GetProperty(sOrdenar, 
                  BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance);
  
              if (propertyInfo != null) if (nSentido == -1) clientes = clientes.OrderByDescending(e =&gt; propertyInfo.GetValue(e, null));
                  else clientes = clientes.OrderBy(e =&gt; propertyInfo.GetValue(e, null));
          }
  
          clientes = clientes.Skip(nRegistroInic).Take(nRegistros);
  
          return await clientes.ToListAsync();
      }
  </code></pre>
  
  <p>And the error I'm getting is the following:</p>
  
  <blockquote>
    <p>System.InvalidOperationException: The LINQ expression 'DbSet
        .Where(c => True)
        .Where(c => c.Activo &amp;&amp; True || False || False)
        .Where(c => True)
        .Where(c => True)
        .OrderBy(c => __propertyInfo_3.GetValue(
            obj: c, 
            index: null))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync().</p>
  </blockquote>
  
  <p>Any thoughts?
  Thanks!</p>