public async Task <IActionResult> Excluir(Guid id) { try { await _perfilService.Excluir(id); return(Ok()); } catch (Exception ex) { return(BadRequest(ex)); } }
public void PerfilServiceTest_Excluir() { _service.Excluir(It.IsAny <Guid>()); _repositoryMock.Verify(x => x.DeleteDocumentFromCollectionAsync(It.IsAny <string>()), Times.Once()); }
public async Task <IActionResult> DeleteConfirmed(int id) { TempData["Message"] = await _perfilService.Excluir(id); return(RedirectToAction(nameof(Index))); }