数据中心读取不走缓存
This commit is contained in:
parent
7c7958bfe2
commit
ddd1ea5887
@ -21,7 +21,7 @@ namespace InSituLaboratory.Service
|
||||
/// <returns></returns>
|
||||
public IEnumerable<SysStatus> GetSysStauts()
|
||||
{
|
||||
return this.Set<SysStatus>().OrderByDescending(n => n.CreateTime);
|
||||
return this.Query<SysStatus>(m => true).OrderByDescending(n => n.CreateTime).AsNoTracking();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -30,7 +30,7 @@ namespace InSituLaboratory.Service
|
||||
/// <returns></returns>
|
||||
public IEnumerable<CurrentWorkEquipment> GetCurrentWorkEquipment()
|
||||
{
|
||||
return this.Set<CurrentWorkEquipment>().OrderByDescending(n => n.CreateTime);
|
||||
return this.Set<CurrentWorkEquipment>().OrderByDescending(n => n.CreateTime).AsNoTracking();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -39,7 +39,7 @@ namespace InSituLaboratory.Service
|
||||
/// <returns></returns>
|
||||
public IEnumerable<CurrentFaultyEquipment> GetCurrentFaultyEquipment()
|
||||
{
|
||||
return this.Set<CurrentFaultyEquipment>().OrderByDescending(n => n.CreateTime);
|
||||
return this.Set<CurrentFaultyEquipment>().OrderByDescending(n => n.CreateTime).AsNoTracking();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ namespace InSituLaboratory.ViewModels.Pages
|
||||
var currentFaultylist = _sysStatusService.GetCurrentFaultyEquipment().ToList();
|
||||
if (sysStatuslist.Count() != 0)
|
||||
{
|
||||
var data = _sysStatusService.GetSysStauts().First();
|
||||
var data = _sysStatusService.GetSysStauts().FirstOrDefault();
|
||||
SysStatusModel.PackagingTime = data.PackagingTime;
|
||||
SysStatusModel.SamplingTime = data.SamplingTime;
|
||||
SysStatusModel.Voltage48 = data.Voltage48;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user