title: Entity Framework Code First: Computed property that can access to is own table
body: <p>Is it possible to create a computed property in EF code first that can use the others elements of it's own table?</p>
  
  <p>If no, what is the best way to do it without using a context method (i would like a property to bind it on the wpf UI without using converters)?</p>
  
  <p>This example shows what i am trying to do (quietly easy to do in a computed sql field):</p>
  
  <pre><code>class MyEntity{
  
  public virtual decimal Amount { get; set; }
  
  public virtual decimal DivideOfThisAmountOnAll
  {
      get
        {
          var sum = *******.sum(e=&gt;e.Amount); //How am i supposed to acces to the others?
          return this.Amount / sum;
        }
   }
  
  }
  </code></pre>