Exemplo n.º 1
0
        public async Task <bool> Delete(JobOffer item)
        {
            _jobOfferRepo.Delete(item);
            await _unitOfWork.Save();

            return(true);
        }
Exemplo n.º 2
0
        public ActionResult Delete(int id)
        {
            var apiResult = TryExecute(() =>
            {
                _jobOfferRepository.Delete(id);
                _unitOfWork.Commit();
                return(true);
            }, "Job Offer deleted sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 3
0
        public async Task <bool> Delete(Guid id)
        {
            if (!_jobOfferRepository.Get(j => j.Id == id).Result.Any())
            {
                Notify("Job offer does not exists.");

                return(false);
            }

            await _jobOfferRepository.Delete(id);

            return(true);
        }
Exemplo n.º 4
0
        public void DeleteJobOffer(Guid id)
        {
            var jobOfferToDelete = _jobOfferRepository.GetSingleById(id);

            if (jobOfferToDelete != null)
            {
                _jobOfferRepository.Delete(jobOfferToDelete);
                if (!_jobOfferRepository.Save())
                {
                    throw new Exception("Deleting job offer failed!");
                }
            }
        }
Exemplo n.º 5
0
 public ActionResult DeleteConfirmed(int id)
 {
     _jobOfferRepository.Delete(id);
     _unitOfWork.Commit();
     return(RedirectToAction("Index"));
 }