예제 #1
0
        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));
            }
        }
예제 #2
0
 public Task <GetAllRolesResponse> GetAllRoles(GetAllRolesRequest request, int UserID)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 /// <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();
 }
예제 #4
0
 public GetAllRolesResponse GetAllRoles(GetAllRolesRequest request)
 {
     return(Execute <GetAllRolesRequest, GetAllRolesResponse>(
                request, response => response.List = _userFacade.GetAllRoles()));
 }