public async Task <NewsDTO> GetByIdAsync(Guid id, CancellationToken token)
        {
            News newsById = await _unitOfWork.NewsRepository.GetByIdAsync(id, token);

            NewsDTO newsDTObyId = _mapper.Map <NewsDTO>(newsById);

            return(newsDTObyId);
        }
        public async Task AddAsync(NewsDTO newsDTO)
        {
            News newsCreated = _mapper.Map <News>(newsDTO);

            await _unitOfWork.NewsRepository.AddAsync(newsCreated);

            await _unitOfWork.SaveChangeAsync();
        }
        public async Task UpdateAsync(NewsDTO newsDTO)
        {
            News newsToUpdate = _mapper.Map <News>(newsDTO);

            try
            {
                _unitOfWork.NewsRepository.Update(newsToUpdate);
                await _unitOfWork.SaveChangeAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                /*if (!NewsExists(newsToUpdate.Id))
                 * {
                 *  throw;
                 * }
                 * else
                 * {
                 *  throw;
                 * }*/
            }
        }