Lab 5: Database and Entity Framework

CS295N, Web Development 1: ASP.NET

(This was lab 6 in previous years.)

Contents

Part A: Tutorial Exercise

Follow the instructions in the tutorial for the two tutorials for the MVC Movie app.

Take a screen-shot of the app running in your web browser at the end of each exercise. Put the screen-shot in a Word document and in that document, report one of the following:

A. I Followed all the steps shown in the tutorials and successfully compiled and ran the program.

B. I Loaded the completed solution, set breakpoints, experimented with the code, and ran the program.

C. I didn't do the exercise.

 

Part B: Saving Data to a Database

Add a Database to your project

Group A

Community Web Site

Refactor your code so that the messages entered by the user on the Home/Contact page are saved in a database.

Group B

Fan Site

Refactor your code so that the stories entered by the user on the Home/Story page are saved in a database.

Group C

Informational Site

Refactor your code so that the comments entered by the user on the Home/Forum page are saved in a database.

 

For all groups

 

Review and Submission

PRs and Code Reviews

  1. Send a PR (Pull Request) to your lab partner asking them to review your code.

    After you have gotten a code review and revised your code as needed, you can merge it into the main branch, but keep the lab branch, don't delete it.

  2. You should receive a PR from your lab partner and review their code using this Code Review Guide.

    On Moodle, in the "online text" field of the Code Review assignment, enter the URL of the pull request with the code review you gave.

Final Submission to Moodle

  1. Publish your web site to Azure.

  2. In the "online text" for the Moodle assignment:

    • Paste a link to the branch of your GitHub repository for this lab.

    • Paste a link to your web site running on Azure.