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)); }
public void Delete(WordsListDTO wordsListDTO) { wordsListRepository.Delete(wordsListDTO.DtoToEntity()); }