我需要将这两个属性定义到我的linqclasses(Employee)之一..因为我需要跟踪Employees的健康进度...每个员工都需要每月进行一次PhysicalExams,因此我定义了这些性能帮助将属性添加到LinqToSql类
public decimal? Initial_Mass_Index
{
get
{
return this.PhysicalExams.OrderBy(p => p.Date).First().MassIndex ?? 0;
}
}
public decimal? Current_Mass_Index
{
get
{
return this.PhysicalExams.OrderByDescending(p => p.Date).First().MassIndex ?? 0;
}
}
我的问题是..我的应用程序正在使用存储库模式,我已阅读,这是不恰当的做法有示范类中数据访问...
你们有什么reccomend ?? 请帮助 在此先感谢