title: How do I get values of Linq Expression
body: <p>I have a method that takes Expression type parameter, in my method i want to get values of this expression but cant find out hot to do that.</p>
  
  <pre><code>private User GetUser(Expression&lt;Func&lt;User, bool&gt;&gt; query)
  {
    User user = Context.User.Where(query).FirstOrDefault();
    return user;
  }
  </code></pre>
  
  <p>I am calling this method with different parameters like</p>
  
  <pre><code>GetUser(u =&gt; u.Username == username);
  
  GetUser(u=&gt; u.Email == email);
  </code></pre>
  
  <p>I want to change GetUser method to work with stored procedures but i need to find what is inside query parameter</p>
  
  <p>I want to check if query is u.Username == username
  I will call GetUserByUsername SP
  if query is u.Email == email
  I will call GetuserByEmail SP</p>