public ParametersController( ITownRepository townRepository, IENodebRepository eNodebRepository, ICellRepository cellRepository, IBtsRepository btsRepository, ICdmaCellRepository cdmaCellRepository, IRegionRepository regionRepository, IENodebPhotoRepository photoRepository) { _townRepository = townRepository; _eNodebRepository = eNodebRepository; _cellRepository = cellRepository; _btsRepository = btsRepository; _cdmaCellRepository = cdmaCellRepository; _regionRepository = regionRepository; _photoRepository = photoRepository; }
public void Import(int eNodebId, IENodebRepository eNodebRepository, ICellRepository cellRepository, IBtsRepository btsRepository, ICdmaCellRepository cdmaCellRepository, IENodebPhotoRepository photoRepository) { ENodeb eNodeb = eNodebRepository.GetAll().FirstOrDefault(x => x.ENodebId == eNodebId); if (eNodeb != null) { ENodeb = eNodeb; Cells = cellRepository.GetAll().Where(x => x.ENodebId == eNodebId).ToList(); } CdmaBts bts = btsRepository.GetAll().FirstOrDefault(x => x.ENodebId == eNodebId); if (bts != null) { int btsId = bts.BtsId; Bts = bts; CdmaCells = cdmaCellRepository.GetAll().Where(x => x.BtsId == btsId).ToList(); } Photos = photoRepository.Photos.Where(x => x.ENodebId == eNodebId).ToList(); }