The objec’ve of this assignment is to reinforce your understanding of ASP.NET Core MVC arch

Assignment 1 Title: Building an MVC Project in Visual Studio Code with .NET 6

 Objec’ve: 

The objec’ve of this assignment is to reinforce your understanding of ASP.NET Core MVC architecture and to build a func’onal MVC web applica’on using Visual Studio Code with .NET 6.

 

Requirements:

 

1)     Environment Setup:

a)     Ensure you have Visual Studio Code (VSCode) and the necessary ASP.NET Core SDKs and extensions installed on your computer. Use .NET 6 for this assignment.

 

2)     Project Crea’on:

a)     Create a new ASP.NET Core MVC project using the “dotnet” command-line tools in VSCode.

 

3)     Sample Controller and Views:

a)     Create one sample controller with two methods:

b)     One method should be named “Index” and should display a simple welcome message or informa’on about your project.

c)     The other method should be named “Todolist” and should receive three parameters: id, ’tle, and descrip’on.

d)     Create corresponding views (using Razor syntax) for both methods in the sample controller.

 

4)     Todolist View:

a)     In the Todolist view, implement input boxes to receive user input for id, ’tle, and descrip’on.

b)     Add a buWon that allows users to add items to a list using the entered data.

c)     Show the added item to the user.

 

5)     Model Crea’on:

a)     Create a model based on your interests, such as a “Smartphone” model.

b)     Include at least six proper’es in the model, including an “Id” property.

 

6)     Scaffolding and Database:

a)     Scaffold the model to automa’cally generate the required controller and views.

b)     Configure a database (SQLite or any other provider of your choice) to store data for your model.

c)     Ensure that your project is configured to work with the database.

 

7)     Seed Data:

a)     Create a seed data file (e.g., SeedData.cs) in the Models folder.

b)     Add at least four records to the database using seed data.

 

8)     Not Found View:

a)     Create a new view file called “NotFound” under the Views/[YourModel] folder.

b)     Update the corresponding methods in the your model controller:

c)     If a user enters a non-existent id, redirect the user to the “NotFound” view.

d)     Display a message to the user indica’ng that the record with the specified id is not found.

e)     Include a link to redirect the user to the index page of your model.

 

Plagiarism Warning:

Using generated code by AI-powered tools like ChatGPT will be considered as plagiarism, and there will be academic consequences.

 

Submission:

To submit your project, please follow these steps:

a)     Create a private repository on GitHub.

b)     Invite “Majid1292” (your GitHub username) as a collaborator to the repository.

c)     Put your project’s source code, including all project files, in the repository.

d)     Submit the repository link through the Blackboard.

 

Grading Criteria:

Your project will be evaluated based on the following criteria:

–        Proper implementa’on of MVC architecture.

–        Func’onality of the sample controller and views.

–        Proper input handling and item addi’on in the Todolist view.

–        Display of the added item to the user.

–        Successful crea’on and scaffolding of the model.

–        Database configura’on and data storage.

–        Correct implementa’on of the Not Found view and handling of non-existent records.

–        Code quality, including readability and structure.

–        Documenta’on and README clarity.