Create ASP.NET Core MVC C# web application with Home controller and implement the following features: 1) In the Home controller, Index method must return “Home” as a content to the browser 2) Add Aboutus action method to the home controller. It must return “About Us” as a content to the browser 3) Add Buyitem action method to the home controller. It must accept ID parameter of string data type. In that method, check if ID parameter is supplied and output the message “ID not supplied”, or “ID supplied:” and ID value. 4) Add Futurevalue action method to the home controller. It must accept three parameters: int years, int rate = 8, decimal investment = 1000 As shown above, default values for rate and investment must be 8 and 1000 respectively. Futurevalue action method must calculate a simple future value of investment. Here is an example code of calculation that you can use: decimal futureValue = investment; for (int i = 0; i < years; i++) { futureValue += (futureValue * rate/100); } Afterwards, the calculated value must be returned to the browser. 5) Add a Route attribute to Futurevalue action method. The route must have four segments: action, years, rate (optional), investment (optional

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter7: File Handling And Applications
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
P1). Create ASP.NET Core MVC C# web application with Home controller and implement the following features: 1) In the Home controller, Index method must return “Home” as a content to the browser 2) Add Aboutus action method to the home controller. It must return “About Us” as a content to the browser 3) Add Buyitem action method to the home controller. It must accept ID parameter of string data type. In that method, check if ID parameter is supplied and output the message “ID not supplied”, or “ID supplied:” and ID value. 4) Add Futurevalue action method to the home controller. It must accept three parameters: int years, int rate = 8, decimal investment = 1000 As shown above, default values for rate and investment must be 8 and 1000 respectively. Futurevalue action method must calculate a simple future value of investment. Here is an example code of calculation that you can use: decimal futureValue = investment; for (int i = 0; i < years; i++) { futureValue += (futureValue * rate/100); } Afterwards, the calculated value must be returned to the browser. 5) Add a Route attribute to Futurevalue action method. The route must have four segments: action, years, rate (optional), investment (optional).
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
List
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage