Example #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;
     }
 }
Example #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);
     }
 }
Example #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.")));
        }
Example #4
0
        public async Task RemoveBanner(int id)
        {
            var existingBanner = _bannerRepository.FindById(id);

            if (existingBanner != null)
            {
                await _bannerRepository.Delete(existingBanner);
            }
        }
Example #5
0
 public bool Delete(int id)
 {
     try
     {
         return(bannerRepository.Delete(id));
     }
     catch
     {
         //Log the error.
         throw;
     }
 }
Example #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());
        }
Example #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"));
 }
Example #9
0
 public void DeleteBanner(int id)
 {
     bannerRepository.Delete(id);
 }
        public void DeleteBanner(int id)
        {
            var banner = bannerRepository.GetById("id");

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