public IEnumerable<PPMRecord> Get(byte? operatorCode, string name, DateTime? startDate = null, DateTime? endDate = null) { PPMDataRepository repo = new PPMDataRepository(); if (startDate.HasValue && endDate.HasValue) { return repo.GetLatestRecords(operatorCode, name, startDate.Value, endDate.Value); } else { return new[] { repo.GetLatestRecord(operatorCode, name) }; } }
public IEnumerable<PPMSector> Get(byte id) { PPMDataRepository repo = new PPMDataRepository(); return repo.GetSectors(id); }
public IEnumerable<PPMSector> Get() { PPMDataRepository repo = new PPMDataRepository(); return repo.GetSectors() .Where(s => !(s.OperatorCode != null && s.SectorCode != null)); }