Пример #1
0
        public PagedResultsDto GetActivatedBackgroundByUserId(long userId, int page, int pageSize)
        {
            var backgroundObj = _backgroundService.Find(userId);

            if (backgroundObj == null)
            {
                throw new NotFoundException(ErrorCodes.BackgroundNotFound);
            }
            if (backgroundObj.IsDeleted)
            {
                throw new ValidationException(ErrorCodes.BackgroundDeleted);
            }
            var results = _backgroundService.GetActivatedBackgroundByUserId(userId, page, pageSize);

            return(results);
        }