public async Task <IActionResult> DeleteConfirmed(Guid id)
        {
            var categoriaMaterialViewModel = _mapper.Map <CategoriaMaterialViewModel>(await _contexto.ObterPorId(id));

            if (categoriaMaterialViewModel == null)
            {
                return(NotFound());
            }

            await _contexto.Remover(id);

            return(RedirectToAction("Index"));
        }
 public async Task Remover(Guid id)
 {
     await _categoriaProdutoRepository.Remover(id);
 }