Example #1
0
        GetById(long idCredit)
        {
            CreditEntity credit = _creditRepository.GetById(idCredit).Result;

            if (credit == null)
            {
                return(HttpStatusCode.NoContent, CreditNoExistMsg, null);
            }
            CreditDataDto prb = new CreditDataDto();

            prb = _mapper.Map(credit, prb);
            return(HttpStatusCode.OK, SuccessMsg, new CreditDataDto
            {
                IdClient = credit.IdCliente,
                IdCredit = credit.IdCredito,
                TermMonths = credit.Plazo,
                Frequency = credit.Frecuencia,
                CapitalValue = credit.ValorCapital,
                TotalValue = credit.ValorTotal,
                CreationDate = credit.FechaCreacion
            });
        }