public IHttpActionResult GetAll(GetAllRolesRequest request) { try { int userTenantId = (int)ActionContext.Request.Properties["UserTenantId"]; var data = _roleManipulation.GetAllRoles(userTenantId, null); if (data == null) { return(NotFound()); } return(Ok(new GetAllRolesResponse() { Data = data, Success = Common.Enumerations.ResponseStatus.Succeeded })); } catch (Exception ex) { return(InternalServerError(ex)); } }
public Task <GetAllRolesResponse> GetAllRoles(GetAllRolesRequest request, int UserID) { throw new NotImplementedException(); }
/// <summary> /// The get all roles. /// </summary> /// <param name="request"> /// The request. /// </param> /// <returns> /// Collection of get all roles response. /// </returns> public List<GetAllRolesResponse> GetAllRoles(GetAllRolesRequest request) { return this.roleRepository.GetAllRoles().ToList().ConvertToGetAllRolesResponseCollection(); }
public GetAllRolesResponse GetAllRoles(GetAllRolesRequest request) { return(Execute <GetAllRolesRequest, GetAllRolesResponse>( request, response => response.List = _userFacade.GetAllRoles())); }