public IEnumerable <CdmaSectorView> QuerySectors(int btsId) { var cells = _repository.GetAllList(btsId); return(cells.Any() ? Mapper.Map <IEnumerable <CdmaCellView>, IEnumerable <CdmaSectorView> >( cells.Select(x => x.ConstructView(_btsRepository))) : new List <CdmaSectorView>()); }
public CdmaCellBaseRepository(ICdmaCellRepository inputRepository) { cellBaseList.Clear(); foreach (CdmaCell cell in inputRepository.GetAllList()) { cellBaseList.Add(new CdmaCellBase(cell)); } }
public IEnumerable <CdmaCellExcel> GetNewCdmaCellExcels() { if (!BasicImportContainer.CdmaCellExcels.Any()) { return(new List <CdmaCellExcel>()); } return(from info in BasicImportContainer.CdmaCellExcels join cell in _cdmaCellRepository.GetAllList() on new { info.BtsId, info.SectorId } equals new { cell.BtsId, cell.SectorId } into cellQuery from cq in cellQuery.DefaultIfEmpty() where cq == null select info); }
public UpdateCdmaLteIdService(IBtsRepository repository, ICdmaCellRepository cellRepository, IEnumerable <CdmaLteIds> lteIds) : this(repository) { var cdmaLteInfos = (from a in repository.GetAllList() join b in cellRepository.GetAllList() on a.BtsId equals b.BtsId where a.ENodebId == -1 select new { a.BtsId, b.CellId }).Distinct(); _eNodebIds = from a in cdmaLteInfos join c in lteIds on a.CellId equals c.CdmaCellId select new BtsENodebIds { ENodebId = c.ENodebId, BtsId = a.BtsId }; }
public UpdateCdmaLteIdService(IBtsRepository repository, ICdmaCellRepository cellRepository, IEnumerable<CdmaLteIds> lteIds) : this(repository) { var cdmaLteInfos = (from a in repository.GetAllList() join b in cellRepository.GetAllList() on a.BtsId equals b.BtsId where a.ENodebId == -1 select new {a.BtsId, b.CellId}).Distinct(); _eNodebIds = from a in cdmaLteInfos join c in lteIds on a.CellId equals c.CdmaCellId select new BtsENodebIds { ENodebId = c.ENodebId, BtsId = a.BtsId }; }