コード例 #1
0
ファイル: CellService.cs プロジェクト: StevenLOL/LtePlatform
        public List <byte> GetSectorIds(string btsName)
        {
            var bts = _btsRepository.GetByName(btsName);

            return(bts == null
                ? null
                : _repository.GetAll().Where(x => x.BtsId == bts.BtsId).Select(x => x.SectorId).Distinct().ToList());
        }
コード例 #2
0
 public async Task <int> UpdateHotSpotCells(CollegeCellNamesContainer container)
 {
     foreach (var cell in from cellName in container.CellNames
              select cellName.GetSplittedFields('-')
              into fields
              where fields.Length > 1
              let bts = _btsRepository.GetByName(fields[0])
                        where bts != null
                        select _cellRepository.GetBySectorId(bts.BtsId, fields[1].ConvertToByte(0))
                        into cell
                        where cell != null
                        select cell)
     {
         await _repository.InsertAsync(new HotSpotCdmaCellId
         {
             BtsId       = cell.BtsId,
             SectorId    = cell.SectorId,
             HotspotType = HotspotType.College,
             HotspotName = container.CollegeName
         });
     }
     return(_repository.SaveChanges());
 }