Esempio n. 1
0
 public static NearestPciCellView ConstructView(NearestPciCell stat, IENodebRepository repository)
 {
     var view = Mapper.Map<NearestPciCell, NearestPciCellView>(stat);
     var eNodeb = repository.GetByENodebId(stat.NearestCellId);
     view.NearestENodebName = eNodeb == null ? "Undefined" : eNodeb.Name;
     return view;
 }
 public void UpdateNeighborCell(NearestPciCell cell)
 {
     var item = _repository.GetNearestPciCell(cell.CellId, cell.SectorId, cell.Pci);
     if (item != null)
     {
         item.NearestCellId = cell.NearestCellId;
         item.NearestSectorId = cell.NearestSectorId;
         _repository.Update(item);
     }
     else
     {
         cell.TotalTimes = 98;
         _repository.Insert(cell);
     }
     _repository.SaveChanges();
 }
 public void Put(NearestPciCell cell)
 {
     _service.UpdateNeighborCell(cell);
 }