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);
 }
예제 #2
0
 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);
     }
 }