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
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
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
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.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage