示例#1
0
        public async Task <IActionResult> Excluir(Guid id)
        {
            try
            {
                await _perfilService.Excluir(id);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(BadRequest(ex));
            }
        }
示例#2
0
        public void PerfilServiceTest_Excluir()
        {
            _service.Excluir(It.IsAny <Guid>());

            _repositoryMock.Verify(x => x.DeleteDocumentFromCollectionAsync(It.IsAny <string>()), Times.Once());
        }
示例#3
0
        public async Task <IActionResult> DeleteConfirmed(int id)
        {
            TempData["Message"] = await _perfilService.Excluir(id);

            return(RedirectToAction(nameof(Index)));
        }