//[SecuredOperation("Sudo,UserOptions.All", Priority = 1)]
        public async Task <List <DegreeForReturnDto> > GetListWithoutPaging(int categoryId)
        {
            var departments = await titleDal.GetListAsync();

            if (departments == null)
            {
                throw new RestException(HttpStatusCode.BadRequest, new { DepartmentListNotFound = Messages.DepartmentListNotFound });
            }

            var departmentForReturn = mapper.Map <List <Degree>, List <DegreeForReturnDto> >(departments);

            return(departmentForReturn);
        }
        public async Task <UserCamPusAndDepartmentAndDegree> UserCamPusAndDepartmentAndDegreeAsync()
        {
            var campuses = await campusDal.GetListAsync();

            var departments = await departmentDal.GetListAsync();

            var degrees = await degreeDal.GetListAsync();

            var mapForReturn = new UserCamPusAndDepartmentAndDegree()
            {
                Campuses    = mapper.Map <List <Campus>, List <CampusForReturnDto> >(campuses),
                Departments = mapper.Map <List <Department>, List <DepartmentForReturnDto> >(departments),
                Degrees     = mapper.Map <List <Degree>, List <DegreeForReturnDto> >(degrees)
            };

            if (mapForReturn == null)
            {
                throw new RestException(HttpStatusCode.BadRequest, new { AlreadyExist = Messages.NotFound });
            }

            return(mapForReturn);
        }