Beispiel #1
0
        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));
            }
        }
Beispiel #2
0
 public ActionResult Delete(int id, PessoaViewModel model)
 {
     _pessoaApplicationService.Delete(id);
     return(RedirectToAction("Index"));
 }