public async Task <IActionResult> GetEmployeeStatus(int?empId) { if (empId == null) { return(BadRequest()); } try { var post = await serviceapi.EmployeeStatus(empId); if (post == null) { return(NotFound()); } return(Ok("Employee is " + post + " in this company.")); } catch (Exception ex) { string x = ex.Message; return(BadRequest()); } }