public async Task<int> UpdateBtss(CollegeBtsIdsContainer container) { foreach (var btsId in container.BtsIds) { var bts = _btsRepository.GetByBtsId(btsId); if (bts == null) continue; await _repository.InsertCollegeBts(container.CollegeName, bts.Id); } return _repository.SaveChanges(); }
public async Task <int> UpdateBtss(CollegeBtsIdsContainer container) { foreach (var btsId in container.BtsIds) { await _repository.InsertAsync(new HotSpotBtsId { BtsId = btsId, HotspotName = container.CollegeName, HotspotType = HotspotType.College }); } return(_repository.SaveChanges()); }
public async Task <int> Post(CollegeBtsIdsContainer container) { return(await _service.UpdateBtss(container)); }
public async Task<int> Post(CollegeBtsIdsContainer container) { return await _service.UpdateBtss(container); }