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); }
public ActionResult Delete(Guid id) { var result = _repo.Delete(id); return(Ok(result)); }
public async Task <bool> Handle(DeleteSalaryCommand request, CancellationToken cancellationToken) { _Repository.Delete(request.id); return(await _Repository.UnitOfWork.SaveEntitiesAsync(cancellationToken)); }