public async Task <IActionResult> DeleteCompanyRole(int id, int roleId) { CompanyRoleDto defaultCompanyRole = await _service.GetDefaultCompanyRole(id); if (defaultCompanyRole.Id == roleId) { return(StatusCode(400, "You can not delete the default role!")); } if (!await _service.DeleteCompanyRole(roleId)) { return(StatusCode(404)); } return(StatusCode(200)); }