title: Dynamic Func<IQueryable<TEntity>, IOrderedQueryable<TEntity>> Expression
body: <p>I am using patterns mentioned here 
  <a href="http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application" rel="noreferrer">http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application</a></p>
  
  <p>And i am using method below to query EF</p>
  
  <pre><code>public virtual IEnumerable&lt;TEntity&gt; Get(
          Expression&lt;Func&lt;TEntity, bool&gt;&gt; filter = null,
          Func&lt;IQueryable&lt;TEntity&gt;, IOrderedQueryable&lt;TEntity&gt;&gt; orderBy = null,
          string includeProperties = "")
      {
          IQueryable&lt;TEntity&gt; query = dbSet;
  
          if (filter != null)
          {
              query = query.Where(filter);
          }
  
          foreach (var includeProperty in includeProperties.Split
              (new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
          {
              query = query.Include(includeProperty);
          }
  
          if (orderBy != null)
          {
              return orderBy(query).ToList();
          }
          else
          {
              return query.ToList();
          }
      }
  </code></pre>
  
  <p>Now i want to create dynamic <code>Func&lt;IQueryable&lt;TEntity&gt;, IOrderedQueryable&lt;TEntity&gt;&gt;</code> expression to order my data. </p>
  
  <p>I know only field name as string and order type (ascending, descending) as string (asc, desc) </p>