public IActionResult DeleteConfirmed(Guid id) { if (ValidarAutoridadeCompra(_compraAppService.ObterPorId(id))) { return(RedirectToAction("Index", _compraAppService.ObterCompraPorCliente(ClienteId))); } _compraAppService.Excluir(id); return(RedirectToAction("Index")); }
public IActionResult Delete(Guid id) { _compraAppService.Excluir(id); return(Response()); }