Beispiel #1
0
 /// <summary>
 /// Métodos para dar de baja lógica a una entidad, pasando la entidad:
 ///     deleteBannerRSS
 ///     deleteBannerTXT
 ///     deleteFuente
 ///     deleteCampania
 ///     deleteImagen
 /// </summary>
 public void deleteBannerRSS(BannerRSS pBanner)
 {
     try
     {
         iBannerRepository.Delete(pBanner);
     }
     catch (Exception exc)
     {
         throw exc;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Delete Batch by ids
 /// </summary>
 /// <param name="ids"></param>
 /// <returns></returns>
 public bool DeleteBatch(List <Guid> ids)
 {
     try
     {
         _repository.Delete(it => ids.Contains(it.ID));
         return(true);
     }
     catch (Exception ex)
     {
         _log.LogError("BannerAppService DeleteBatch error occured:" + ex.Message);
         return(false);
     }
 }
Beispiel #3
0
        public async Task <ActionResultResponse> Delete(string tenantId, string bannerId)
        {
            var checkExists = await _bannerRepository.CheckInfo(bannerId);

            if (!checkExists)
            {
                return(new ActionResultResponse(-1, _resourceService.GetString("Banner does not exists.")));
            }

            var result = await _bannerRepository.Delete(bannerId);

            return(new ActionResultResponse(result, result <= 0 ? _sharedResourceService.GetString("Something went wrong. Please contact with administrator.")
                : _resourceService.GetString("Delete Banner successful.")));
        }
        public async Task RemoveBanner(int id)
        {
            var existingBanner = _bannerRepository.FindById(id);

            if (existingBanner != null)
            {
                await _bannerRepository.Delete(existingBanner);
            }
        }
Beispiel #5
0
 public bool Delete(int id)
 {
     try
     {
         return(bannerRepository.Delete(id));
     }
     catch
     {
         //Log the error.
         throw;
     }
 }
Beispiel #6
0
        public async Task <IActionResult> Delete(int id)
        {
            var bannerFromDb = await _bannerRepository.GetBanner(id);

            if (bannerFromDb == null)
            {
                return(new NotFoundResult());
            }

            await _bannerRepository.Delete(id);

            return(new OkResult());
        }
Beispiel #7
0
 // Delete an entry logic
 public void Delete(int id)
 {
     try
     {
         Banner find = repository.Get(id);
         if (find == null)
         {
             throw new Exception("Banner with the provided ID does not exist.");
         }
         repository.Delete(id);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public ActionResult Delete(int id)
 {
     _bannerRepository.Delete(id);
     return(RedirectToAction("BannerList"));
 }
Beispiel #9
0
 public void DeleteBanner(int id)
 {
     bannerRepository.Delete(id);
 }
        public void DeleteBanner(int id)
        {
            var banner = bannerRepository.GetById("id");

            bannerRepository.Delete(banner);
        }
Beispiel #11
0
 public Banner Delete(int id)
 {
     return(_bannerRepository.Delete(id));
 }
 public bool DeleteBanner(Guid id)
 {
     _bannerRepo.Delete(id);
     return(_unitOfWork.Commit());
 }
 public Banner Delete(Banner entity)
 {
     return(_banner.Delete(entity));
 }
 public void Delete(int id)
 {
     _bannerRepository.Delete(id);
     _uow.SaveChanges();
 }
Beispiel #15
0
 public Banner Delete(int id)
 {
     return(_banner.Delete(id));
 }