public async Task <IActionResult> DeleteConfirmed(Guid id) { var motoristaViewModel = await ObterMotoristaPorId(id); if (motoristaViewModel == null) { return(NotFound()); } await _motoristaRepository.Deletar(id); return(RedirectToAction(nameof(Index))); }