コード例 #1
0
        public async Task <IActionResult> Create([Bind("Id,Name,Description,GeneralInformation,MinLoanSum,MaxLoanSum,InterestRate,LoanSummary,MonthlyFee,MinTerm,MaxTerm,PaymentForAccidentInsurance,FeeForInsuranceLoan,FreeForServicesUponReciptCash,CurrencyId")] LoanType loanType)
        {
            if (ModelState.IsValid)
            {
                await _loanTypeService.AddLoan(loanType);

                return(RedirectToAction(nameof(Index)));
            }


            ViewData["CurrencyId"] = new SelectList(await _currencyService.GetAll(), "Id", "Name");
            return(View(loanType));
        }