public IActionResult Count(string companyCode, UserType type) { try { var count = _employee.Count(companyCode, type); return(Ok(new { status = true, result = count })); } catch (InvalidException err) { return(Ok(new { status = false, result = err.Message })); } catch (Exception ex) { return(BadRequest(ex.Message)); } }