Esempio n. 1
0
 public OutputBase DeleteSalary(DeleteSalaryInput input)
 {
     _salaryRepository.Delete(input.SalaryId);
     return(new OutputBase {
         Message = "Salary Deleted", Success = true
     });
 }
        public void DeleteSalary(int id)
        {
            var salaryDeductions = _salaryDeductionRepository.GetList().Where(x => x.SalaryId == id).ToList();

            foreach (var salaryDeduction in salaryDeductions)
            {
                _salaryDeductionRepository.Delete(salaryDeduction);
            }

            var salary = _salaryRepository.GetById(id);

            _salaryRepository.Delete(salary);
        }
Esempio n. 3
0
        public ActionResult Delete(Guid id)
        {
            var result = _repo.Delete(id);

            return(Ok(result));
        }
Esempio n. 4
0
        public async Task <bool> Handle(DeleteSalaryCommand request, CancellationToken cancellationToken)
        {
            _Repository.Delete(request.id);

            return(await _Repository.UnitOfWork.SaveEntitiesAsync(cancellationToken));
        }