コード例 #1
0
 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();
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 public async Task <int> Post(CollegeBtsIdsContainer container)
 {
     return(await _service.UpdateBtss(container));
 }
コード例 #4
0
 public async Task<int> Post(CollegeBtsIdsContainer container)
 {
     return await _service.UpdateBtss(container);
 }