假设下一个实体
public class Result
{
[Required]
public virtual int Id { get; set; }
[Required]
public virtual Sku Sku { get; set; }
[Required]
public virtual Payer Payer { get; set; }
[Required]
public virtual double StkPrev { get; set; }
[Required]
public virtual double StkCurrent { get; set; }
[Required]
public virtual double Buy { get; set; }
public virtual double SellOut {get { return StkPrev + Buy - StkCurrent; }}
... }
我需要专门映射数据库中的属性“SellOut”。
我该怎么办?