Exemple #1
0
        public async Task <ActionResult <PayslipDto> > GetPayslipById(string id)
        {
            var getPaySlipById = await _payslipRepository.GetPayslipByIdAsync(id);

            if (getPaySlipById is null)
            {
                return(BadRequest(new Response {
                    Status = "Error", Message = $"The information with id={id} is not found"
                }));
            }
            return(Ok(getPaySlipById));
        }