Is it possible to create a computed property in EF code first that can use the others elements of it's own table?
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)?
This example shows what i am trying to do (quietly easy to do in a computed sql field):
class MyEntity{
public virtual decimal Amount { get; set; }
public virtual decimal DivideOfThisAmountOnAll
{
get
{
var sum = *******.sum(e=>e.Amount); //How am i supposed to acces to the others?
return this.Amount / sum;
}
}
}