public async Task <IActionResult> UpdatePayroll([FromBody] JsonPatchDocument <Payroll> patchDoc, int id) { if (patchDoc == null) { return(BadRequest()); } var payroll = await _repository.UpdatePayroll(id, patchDoc); if (payroll == null) { return(NotFound()); } return(NoContent()); }