public IActionResult CreateSalary([FromBody] Salary salary)
 {
     if (salary == null)
     {
         return(BadRequest(ModelState));
     }
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     if (!_SalaryRepository.CreateSalary(salary))
     {
         return(StatusCode(500, ModelState));
     }
     return(CreatedAtRoute("GetSalary", new { salaryId = salary.SalaryId }, salary));
 }
        public async Task <ActionResult> CreateSalary([FromBody] SalaryCreateDTO salaryDTO)
        {
            var salaryObj = await _repository.CreateSalary(salaryDTO);

            return(CreatedAtAction(nameof(GetSalary), new { id = salaryObj.Id }, salaryObj));
        }