public IActionResult Remove(int clienteId, Credit credit)
        {
            var cliente = _clientService.FindById(clienteId);

            if (cliente == null)
            {
                return(NotFound());
            }

            _creditService.Remove(credit, clienteId);

            return(RedirectToRoute(new { controller = "Clients", action = "Credits", id = clienteId }));
        }
예제 #2
0
        public IActionResult Delete(string id)
        {
            var credit = _creditService.Get(id);

            if (credit == null)
            {
                return(NotFound());
            }

            _creditService.Remove(credit.Id);

            return(NoContent());
        }