Exemplo n.º 1
0
        public IActionResult SearchLoan(SearchLoanViewModel filter)
        {
            // Find loan by LoanId
            // Verify that borrower email id matches for security
            // Show loan details along with Insurance details
            // If no insurance found/ insurance expired,
            // display text box to enter "Coverage Required" and "Show Quotes" button
            // Click of "Show Quotes" should redirect to Quotes action along with loanId and coverageRequired

            var loan = new InsuranceLoanViewModel();

            return(View(loan));
        }
Exemplo n.º 2
0
        public IActionResult Quotes(int loanId, float coverageRequired)
        {
            // Get loan details using loanId. Can consider saving this in session for better performance
            // If required, we can validate that coverageRequired > Loan.RemainingAmount

            var loan = new InsuranceLoanViewModel();

            var request = new InsuranceQuoteRequest
            {
                Area             = loan.Property.Area,
                CoverageRequired = coverageRequired,
                PropertyType     = loan.Property.PropertyType,
                ZipCode          = loan.Property.ZipCode
            };

            List <InsuranceQuoteViewModel> quotes = _insuranceService.GetInsuranceQuotes(request);

            // Show list of quotes along with select button
            // Select button should redirect to BuyInsurance action with necessary parameters

            return(View(quotes));
        }