public async Task <IActionResult> Delete(string id) { try { var command = new PessoaDeleteCommand { Id = id }; var result = await pessoaApplicationService.Delete(command); return(Ok(result)); } catch (Exception e) { return(StatusCode(500, e.Message)); } }
public ActionResult Delete(int id, PessoaViewModel model) { _pessoaApplicationService.Delete(id); return(RedirectToAction("Index")); }