public int QueryExistedStatsCount(int eNodebId, byte sectorId, DateTime date) { var beginDay = date.Date; var nextDay = date.AddDays(1).Date; var cellId = eNodebId + "-" + sectorId; return(_repository.Count(x => x.CellId == cellId && x.StatDate >= beginDay && x.StatDate < nextDay)); }
public Tuple <int, bool> QueryExistedStatsCount(int eNodebId, byte sectorId, DateTime date) { var beginDay = date.Date; var nextDay = date.AddDays(1).Date; return(new Tuple <int, bool>(_repository.Count( x => x.ENodebId == eNodebId && x.SectorId == sectorId && x.RecordTime >= beginDay && x.RecordTime < nextDay), _statRepository.Get(eNodebId, sectorId, beginDay) != null)); }