public async Task <IActionResult> UpdateStatusAsync(int?id, [FromBody] EnrolleeUpdateStatusModel enrolleeUpdateStatusModel) { if (!ModelState.IsValid) { return(BadRequest()); } if (id.HasValue) { var enrolleeUpdateDto = _mapper.Map <EnrolleeUpdateStatusDto>(enrolleeUpdateStatusModel); enrolleeUpdateDto.Id = id.Value; var statusCode = await _enrolleeService.UpdateStatusAsync(enrolleeUpdateDto); var response = _enrolleeResponseComposer.ComposeForUpdateStatus(statusCode); return(response); } return(BadRequest()); }