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 }));
        }
        public IActionResult Delete(string id)
        {
            var credit = _creditService.Get(id);

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

            _creditService.Remove(credit.Id);

            return(NoContent());
        }