title: Entity Framework 4.1 simple dynamic expression for object.property = value
body: <p>I know there is a way to use Expressions and Lambdas to accomplish this but I having a hard time piecing it all together. All I need is a method that will dynamically query an Entity Framework DBSet object to find the row where the propery with the given name matches the value.</p>
  
  <p>My context:</p>
  
  <pre><code>public class MyContext : DbContext
  {
      public IDbSet&lt;Account&gt; Accoounts{ get { return Set&lt;Account&gt;(); } } 
  }
  </code></pre>
  
  <p>The method that I'm looking to write:</p>
  
  <pre><code>public T Get&lt;T&gt;(string property, object value) : where T is Account
  {...}
  </code></pre>
  
  <p>I would rather not have to use Dynamic SQL to accomplish this so no need to suggest it because I already know it's possible. What I'm really looking for is some help to accomplish this using Expressions and Lambdas</p>
  
  <p>Thanks in advance, I know it's brief but it should be pretty self-explanatory. Comment if more info is needed</p>