public IHttpActionResult GetAllRoleList() { try { if (HttpContext.Current.User.Identity.IsAuthenticated) { string userId = HttpContext.Current.User.Identity.GetUserId(); var companyDetail = _companyRepository.GetCompanyDetailByUserId(userId); var roleList = _workFlowRepository.GetAllRoleList(companyDetail.Id); return(Ok(roleList)); } else { return(BadRequest()); } } catch (Exception ex) { _errorLog.LogException(ex); throw; } }