public static void SaveRsrpTaStats(this IMroCellRepository repository, IEnumerable <MroRsrpTa> stats) { foreach (MroRsrpTa stat in from stat in stats let item = repository.GetAll().FirstOrDefault(x => x.RecordDate == stat.RecordDate && x.CellId == stat.CellId && x.SectorId == stat.SectorId) where item == null select stat) { repository.Insert(stat); } }
public IEnumerable <MroRsrpTa> Get(int cellId, byte sectorId, DateTime date) { return(_repository.GetAll().Where(x => x.CellId == cellId && x.SectorId == sectorId && x.RecordDate == date)); }