Esempio n. 1
0
        public async Task CreateBookmarkAsync(CreateBookmark createBookmark)
        {
            var textExist = await _textRepository.ExistAsync(createBookmark.TextId);

            if (!textExist)
            {
                throw new NotFoundException("TextId not found");
            }

            var userExist = await _userRepository.ExistAsync(createBookmark.UserId);

            if (!userExist)
            {
                throw new NotFoundException("UserId not found");
            }

            await _textRepository.CreateBookmarkAsync(createBookmark);
        }