Ejemplo n.º 1
0
        public async Task <IActionResult> UnattachSupplier(Guid id, Guid fornecedorId)
        {
            var commandResult = await _produtoApplicationService.RemoverFornecedor(id, fornecedorId);

            if (commandResult.Success)
            {
                NotifyCommandResultSuccess();
            }
            else
            {
                NotifyCommandResultErrors(commandResult.Errors);
            }

            return(RedirectToAction(nameof(Details), new { id }));
        }