Esempio n. 1
0
        public async Task <WordsList> Delete(long id, UserInfo userInfo)
        {
            if (userInfo == null)
            {
                throw new NotAuthException();
            }


            var rec = await _wordsListRepository.GetByIdIfAccess(id, userInfo.UserId);

            if (rec == null)
            {
                throw new SomeCustomException(ErrorConsts.NotFound);
            }

            return(await _wordsListRepository.Delete(rec));
        }
Esempio n. 2
0
 public void Delete(WordsListDTO wordsListDTO)
 {
     wordsListRepository.Delete(wordsListDTO.DtoToEntity());
 }