Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in MortgageController.cs, exception was throw. #3

Open
Eliaxs1900 opened this issue Jun 23, 2019 · 1 comment
Open

Error in MortgageController.cs, exception was throw. #3

Eliaxs1900 opened this issue Jun 23, 2019 · 1 comment

Comments

@Eliaxs1900
Copy link

I pulled this repository, following the steps of page 344-346 i received this error:

Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLNNMLQLRAUU", Request id "0HLNNMLQLRAUU:00000001": An unhandled exception was thrown by the application.
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: count
at System.Linq.Enumerable.Range(Int32 start, Int32 count)
at Optimizer.MortgageController.GetBestRepaymentDate(Decimal AmountRepaid, Decimal ReplacementFixRate, Mortgage m) in /app/MortgageController.cs:line 18
at lambda_method(Closure , Object , Object[] )

@jp-gouigoux
Copy link
Member

Hello,

My guess is that you have used values for the dates of repayment that do not correspond to a realistic situation. Since the repayment will be calculated at the current month, the end date of the mortgage (begin date + length) has to be in the future when you click on the button. Please tell me if adjusting this works for you.

JP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants