title: Unable to sort with property name in LINQ OrderBy
body: <p>Error is </p>
  
  <blockquote>
    <p><em>LINQ to Entities does not recognize the method 'System.Object
    GetValue(System.Object, System.Object[])' method, and this method
    cannot be translated into a store expression.</em></p>
  </blockquote>
  
  <p>My code is </p>
  
  <pre><code>public static GridResult GetAllUsers(int count, int tblsize,string sortcreteria)
  {
        using (UserEntities entity = new UserEntities())
        {
  
            var data = entity.User_Details.Take(count)
  .OrderBy(i =&gt;.GetType().GetProperty(sortcreteria).GetValue(i,null))
  .Skip(tblsize).ToList();
            result.DataSource = data;
            result.Count = entity.User_Details.Count();
        }
        return result;
  }
  </code></pre>
  
  <p>How to sort with property name as string?</p>