Example #1
0
        public ActionResult <Loan> AddLoan(Loan item)
        {
            string errorString;

            if (_loanValidator.AddLoanIsValid(item, out errorString))
            {
                return(BadRequest(new JsonResult(errorString)));
            }

            _loanRepository.AddLoan(item);

            return(Ok(item));
        }