public IActionResult PaymentsSchedule(InputDataCredit inputDataCredit)
        {
            if (!ModelState.IsValid)
            {
                ModelState.AddModelError(string.Empty, "One or some parameter(-s) of credit is not valid.");

                return(RedirectToAction("Index", "Credit"));
            }

            var creditDetails = _creditCalculatorService.GetOutputCreditDetails(inputDataCredit);

            return(View(creditDetails));
        }
Пример #2
0
        public OutputDataCredit GetOutputCreditDetails([FromBody] InputDataCredit inputDataCredit)
        {
            var creditDetails = _creditCalculatorService.GetOutputCreditDetails(inputDataCredit);

            return((OutputDataCredit)creditDetails);// TODO вместо каста сделать маппером
        }