public static IEnumerable <MrsCellDate> QueryItems( this IMrsCellRepository repository, IEnumerable <ENodeb> eNodebs, DateTime startDate, DateTime endDate) { return(from e in eNodebs join s in repository.GetAll().Where(x => x.RecordDate >= startDate && x.RecordDate <= endDate) on e.ENodebId equals s.CellId select s); }
public static void SaveStats(this IMrsCellRepository repository, IEnumerable <MrsCellDate> stats) { foreach (MrsCellDate 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) { stat.UpdateStats(); repository.Insert(stat); } }
public RutraceController(IENodebRepository eNodebRepository, ICellRepository cellRepositroy, ITownRepository townRepository, IMrsCellRepository mrsRepository) { PageSize = 10; _eNodebRepository = eNodebRepository; _cellRepository = cellRepositroy; _townRepository = townRepository; _mrsRepository = mrsRepository; }